How do you check that a number is NaN in JavaScript?

Posted by Paul D. Waite on Stack Overflow See other posts from Stack Overflow or by Paul D. Waite
Published on 2010-04-16T10:56:00Z Indexed on 2010/04/16 11:03 UTC
Read the original article Hit count: 438

Filed under:

I’ve only been trying it in Firefox’s JavaScript console, but neither of the following statements return true:

parseFloat('geoff') == NaN;

parseFloat('geoff') == Number.NaN;

© Stack Overflow or respective owner

Related posts about JavaScript