View wtf_4.js
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
Number("0."); // 0 | |
Number(".0"); // 0 | |
Number("."); // NaN | |
Number(undefined); // NaN | |
Number(null); // 0 |
View wtf_3.js
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
24.toFixed(2); // Syntax Error | |
24. toFixed(2); // Syntax Error | |
24 .toFixed(2); // "24.00" | |
24 . toFixed(2); // "24.00" | |
24.0.toFixed(2); // "24.00" |
View wtf_2.js
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
1 < 2 < 3; // true | |
3 > 2 > 1; // false |
View wtf_1.js
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
Number.MAX_VALUE > 0; // true | |
Number.MIN_VALUE < 0; // false |