JavaScript · Junior · Question 3 of 75
What does typeof NaN return?
- ✓Correct answer:
'number' - 2
'NaN' - 3
'undefined'
Explanation
NaN (Not-a-Number) is a special value of the number type, the result of an invalid math operation such as 0 / 0 or Number('abc'). Check for it with Number.isNaN(x).