Language types

Null language type

Try the free JavaScript compiler

The Null language type has one value, null, commonly used for explicit absence. It is a primitive even though typeof null produces the historical tag object. Null and undefined are distinct in strict equality.

Formal Syntax & Structure

javascript syntaxjavascript
const selected = null;

Working Example

Example Snippetjavascript
console.log(null === undefined);
JavaScript Reference