Login to manage your account

Please enter a valid email address.
Forgot Password?
Please enter a valid password.
OR

Don't have an account yet? Sign up

How do you correctly check whether a value is NaN?

  1. A value === NaN
  2. B value == NaN
  3. C Number.isNaN(value)
  4. D typeof value === 'NaN'
Answer

Number.isNaN(value)

NaN is not equal to anything including itself. Number.isNaN is preferred over the global isNaN, which coerces its argument first.

All Javascript MCQs

Login to manage your account

Please enter a valid email address.
Forgot Password?
Please enter a valid password.
OR

Don't have an account yet? Sign up as