JavaScript · Junior · Question 10 of 75

What does NaN === NaN return?

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.

Further reading

Problem with a question

JavaScript · Junior · question 10

Test yourself

Take the JavaScript · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz