Standard built-ins

Number.isNaN()

Try the free JavaScript compiler

Checks whether the supplied value is a Number whose value is NaN. Unlike the global isNaN function, this operation does not first coerce its input. Useful after explicit Number conversion to identify invalid numeric text.

Formal Syntax & Structure

javascript syntaxjavascript
Number.isNaN(value)

Parameters & Attributes

NameTypeDescription
valueanyValue to check without conversion.

Return Value

boolean

True only for actual Number NaN.

Working Example

Example Snippetjavascript
console.log(Number.isNaN(NaN));console.log(Number.isNaN("oops"));
JavaScript Reference