NaN

NaN — Not a Number. A value that is used to represent the the value is not a number. This will often be a result when performing math operations on values that is not a number. This is the same as the value of Number.NaN.

Description

NaN

Examples

Example #1 – NaN
var b = NaN; console.log(typeof b); // number console.log(b); // NaN
Example #2 – NaN as a math result
var a = 'one'; var b = 2; console.log(a * b); // NaN console.log(a); // one console.log(b); // 2

See also

External references