Skip to content

Instantly share code, notes, and snippets.

@butchi
Created October 20, 2012 16:50
Show Gist options
  • Select an option

  • Save butchi/3923975 to your computer and use it in GitHub Desktop.

Select an option

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

butchi commented Oct 20, 2012

Copy link
Copy Markdown
Author

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

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