NaN
noun
say it: “NAN” /næn/
Not a Number: the value JavaScript gives when math on something that isn't a number fails.
What is NaN in JavaScript?
NaN — A special Number value meaning the result is not a valid number.
const result = Number("tea");
const invalid = Number.isNaN(result);
In a sentence
- “Number("abc") gave NaN, so the total showed NaN too.”
Level: Novice · More JavaScript terms at this level
Updated