Skip to content

Instantly share code, notes, and snippets.

@golyshevd
Last active August 29, 2015 14:06
Show Gist options
  • Save golyshevd/80d6b00d93f879589444 to your computer and use it in GitHub Desktop.
Save golyshevd/80d6b00d93f879589444 to your computer and use it in GitHub Desktop.
// decimals
+'5' // 5 like parseInt('5', 10)
+'-5' // -5 like parseInt('-5', 10)
//octals
+'010' // 10 like parseInt('010', 10), should the radix be 8?
+'-010' // -10 like parseInt('-010', 10), should the radix be 8?
//hexadecimals
+'0xFF' // 255 like parseInt('0xFF', 16)
+'-0xFF' // NaN ???
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment