JavaScript · Junior · Question 10 of 75
What does NaN === NaN return?
- ✓Correct answer:
false - 2
true - 3
NaN
Explanation
NaN is not equal to anything, not even itself. Use Number.isNaN(x) or Object.is(x, NaN) to check. The global isNaN('abc') coerces its argument to a number first and returns true for strings.