JavaScript · Junior · Question 3 of 75

What does typeof NaN return?

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).

Further reading

Problem with a question

JavaScript · Junior · question 3

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