tumble. phil adams.

  • Archive
  • RSS

javascript NaN

so. NaN (not a number) is classified as a primitive value by the ECMA-262 standard and indicates that the specified value is not a legal number. NaN is not a string, and not a number itself, so it can’t be checked for with != or ==. in fact, you have to use the isNaN() function! Why I can’t use a .nil? or have my parseInt(“you cannot convert me!”) return null i don’t know…

of course it gets really interesting if you do typeof(parseInt(“you cannot convert me!”)). that of course yields ‘number’. hmm.

  • 3 years ago
  • Permalink
  • Share
    Tweet
← Previous • Next →

About

<witty description />
  • RSS
  • Random
  • Archive
  • Mobile

Effector Theme by Carlo Franco.

Powered by Tumblr