Question
Share
Sign Up to our social questions and Answers to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers to ask questions, answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
NaN is Not-A-Number.
There are five different types of operations that return NaN:
Number cannot be parsed (e.g. parseInt(“blabla”) or Number(undefined))
Math operation where the result is not a real number (e.g. Math.sqrt(-1))
Operand of an argument is NaN (e.g. 7 ** NaN)
Indeterminate form (e.g. 0 * Infinity, or undefined + undefined)
Any operation that involves a string and is not an addition operation (e.g. “foo” / 3)
ex:
What is the type of NaN?
The type of NaN, which stands for Not a Number is, surprisingly, a number. The reason for this is, in computing, NaN is actually technically a numeric data type. However, it is a numeric data type whose value cannot be represented using actual numbers