Skip to content

Instantly share code, notes, and snippets.

@butchi
Created October 20, 2012 16:50
Show Gist options
  • Save butchi/3923975 to your computer and use it in GitHub Desktop.
Save butchi/3923975 to your computer and use it in GitHub Desktop.
parseInt('0x')
parseInt('5x'); //=> 5
parseInt('0y'); //=> 0
parseInt('0x'); //=> NaN
parseInt('', 16) //=> NaN
@butchi
Copy link
Author

butchi commented Oct 20, 2012

'0x'をparseIntすると空の16進数とみなされNaNが返ってくる。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment