NaN

suggest change

NaN stands for “Not a Number.” When a mathematical function or operation in JavaScript cannot return a specific number, it returns the value NaN instead.

It is a property of the global object, and a reference to Number.NaN

window.hasOwnProperty('NaN'); // true
NaN; // NaN

Perhaps confusingly, NaN is still considered a number.

typeof NaN; // 'number'

Don’t check for NaN using the equality operator. See isNaN instead.

NaN == NaN  // false
NaN === NaN // false

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:


Built-in constants:
* null
* NaN

Table Of Contents
3 Built-in constants
11 Arrays
12 Objects
14 Classes
16 Map
17 Set
24 Loops
27 Date
29 Scope
30 AJAX
35 Cookies
41 JSON
44 Fetch
45 Modules
46 Screen
64 Console
68 Symbols
73 Modals
76 Events
86 Proxy
89 WeakMap
90 WeakSet
102 Tilde