Created
October 20, 2012 16:50
-
-
Save butchi/3923975 to your computer and use it in GitHub Desktop.
parseInt('0x')
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
parseInt('5x'); //=> 5 | |
parseInt('0y'); //=> 0 | |
parseInt('0x'); //=> NaN | |
parseInt('', 16) //=> NaN |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
'0x'をparseIntすると空の16進数とみなされNaNが返ってくる。