Null is a value that indicates the absence of a value. It is often used to indicate an intentional lack of a value, while undefined is a value that indicates that a variable has not been assigned a value.

Example:

Null:
let x = null;

Undefined:
let y;

Leave a Reply

Your email address will not be published. Required fields are marked *