Number.NaN (Constant/static)

A mathematical constant value.

Availability:

ECMAScript edition - 2
JavaScript - 1.1
JScript - 1.0
Internet Explorer - 3.02
Netscape - 3.0
Netscape Enterprise Server version - 2.0
Opera - 3.0
Property/method value type:Number primitive
JavaScript syntax:-Number.NaN

This is a value representing invalid numeric values. It should be identical to the NaN value provided by the Global object in an ECMA-compliant implementation. Refer to the coverage of the NaN topic for full details.

However, it is generally considered unreliable to compare against NaN values with a simple equality test. To reliably test whether a numeric value is NaN or a good numeric value, use the isNaN() function and select an appropriate action according to its result.

See also:Arithmetic constant, NaN, Number.constructor, Special number values

Property attributes:

ReadOnly, DontDelete, DontEnum

Cross-references:

ECMA 262 edition 2 - section - 15.7.3.4

ECMA 262 edition 3 - section - 15.7.3.4

O'Reilly JavaScript Definitive Guide - page - 37