Skip to content

Instantly share code, notes, and snippets.

@brajendraSwain
Last active August 30, 2016 11:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brajendraSwain/87a693e39df546d1a468ec09fdc9a6d0 to your computer and use it in GitHub Desktop.
Save brajendraSwain/87a693e39df546d1a468ec09fdc9a6d0 to your computer and use it in GitHub Desktop.

###>isFinite

> Number.isFinite('123')
false
> isFinite('123')
true

###>isNaN

  • Is number the value NaN? Making this check via === is hacky. NaN is the only value that is not equal to itself:
> Number.isNaN('???')
false
> isNaN('???')
true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment