Created
March 23, 2011 21:16
-
-
Save ahmadajmi/884008 to your computer and use it in GitHub Desktop.
This file contains 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("a12") // return NaN | |
parseInt("12", 1) // return NaN | |
parseInt("12", 50) // return NaN | |
parseInt("12") // return 12 | |
parseInt("12", 10) // return 12 | |
parseInt("12", 8) // return 10 | |
parseInt("12", 16) // return 18 | |
parseInt("01") // return 1 | |
parseInt("08") // return 0 | |
parseInt("08", 10) // return 8 | |
parseInt("0XFF") // return 255 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment