JavaScript tutorial:
NaN property

 

Applies to: Number Object

The NaN property is used to get a special value that indicates an arithmetic expression returned a value that was not a number.

Syntax

Number.NaN

The number argument is the Number object.

Return value

Returns a value that was not a number.

Example

The Number object does not have to be created before the NaN property can be accessed.

NaN does not compare equal to any value, including itself. To test if a value is equivalent to NaN, use the isNaN function.

See also: isNaN Method, MAX_VALUE Property, MIN_VALUE Property, NEGATIVE_INFINITY Property, POSITIVE_INFINITY Property, toString Method