Understanding null and undefined in Javascript


null is an assignment value indicating no value, while undefined signifies that a variable has not been assigned a value.

Source Code

let a = null;
let b;
console.log(a); // null
console.log(b); // undefined
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments