null
suggest changenull is used for representing the intentional absence of an object value and is a primitive value. Unlike undefined, it is not a property of the global object.
It is equal to undefined but not identical to it.
null == undefined; // true
null === undefined; // false
Note: typeof null is 'object'.
typeof null; // 'object';
To properly check if a value is null, compare it with the strict equality operator.
const a = null;
a === null; // true
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents