tasks a-s
This commit is contained in:
parent
47bf37c096
commit
b83f433714
12433 changed files with 156208 additions and 123 deletions
|
|
@ -0,0 +1,6 @@
|
|||
+"0123459"; // 123459
|
||||
+"0xabcf123"; // 180154659
|
||||
|
||||
// also supports negative numbers, but not for hex:
|
||||
+"-0123459"; // -123459
|
||||
+"-0xabcf123"; // NaN
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
parseInt(" 0xF", 16);
|
||||
parseInt(" F", 16);
|
||||
parseInt("17", 8);
|
||||
parseInt(021, 8);
|
||||
parseInt("015", 10);
|
||||
parseInt(15.99, 10);
|
||||
parseInt("FXX123", 16);
|
||||
parseInt("1111", 2);
|
||||
parseInt("15*3", 10);
|
||||
parseInt("15e2", 10);
|
||||
parseInt("15px", 10);
|
||||
parseInt("12", 13);
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
parseInt("Hello", 8); // Not a number at all
|
||||
parseInt("546", 2); // Digits are not valid for binary representations
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
parseInt("-F", 16);
|
||||
parseInt("-0F", 16);
|
||||
parseInt("-0XF", 16);
|
||||
parseInt(-10, 16);
|
||||
parseInt(-15.1, 10)
|
||||
parseInt(" -17", 8);
|
||||
parseInt(" -15", 10);
|
||||
parseInt("-1111", 2);
|
||||
parseInt("-15e1", 10);
|
||||
parseInt("-12", 13);
|
||||
|
|
@ -0,0 +1 @@
|
|||
parseInt("0e0", 16);
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
parseInt("0e0"); // 0
|
||||
parseInt("08"); // 0, '8' is not an octal digit.
|
||||
Loading…
Add table
Add a link
Reference in a new issue