DEV Community

NEYAZ NAFIZ
NEYAZ NAFIZ

Posted on

1 1

undefined and null in JavaScript

Undefined means a variable has been declared but there is no value assigned yet in that variable. Unassigned variables are initialized by the default value of undefined in JavaScript. Good to said, the value does not exist in the compiler. It is the global object.

Null means an empty or non-existent value, null is also an object. Good to said, It is the intentional absence of the value. It is one of the primitive values of JavaScript.

Top comments (0)

Qodo Takeover

Introducing Qodo Gen 1.0: Transform Your Workflow with Agentic AI

Rather than just generating snippets, our agents understand your entire project context, can make decisions, use tools, and carry out tasks autonomously.

Read full post

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay