Lexical syntax

null literal

Try the free JavaScript compiler

The literal null evaluates to the sole Null value. It is not a string, identifier naming an arbitrary value, or an empty object. Use it where the application intentionally represents absence.

Formal Syntax & Structure

javascript syntaxjavascript
null

Working Example

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