Created
December 21, 2013 13:34
-
-
Save kcjpop/8069380 to your computer and use it in GitHub Desktop.
Some small JS tests
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. ++Math.PI | |
2. (0.1 + 0.2) + 0.3 == 0.1 + (0.2 + 0.3) | |
3. typeof NaN | |
4. typeof typeof undefined | |
5. a = {null:null}; typeof a.null; | |
6. a = "5"; b = "2"; c = a * b; | |
7. a = "5"; b = 2; c = a+++b; | |
8. isNaN(1/null) | |
9. (16).toString(16) | |
10. 016 * 2 | |
11. ~null | |
12. "ab c".match(/\b\w\b/) |
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. 4.141592653589793 | |
2. false | |
3. "number" | |
4. "string" | |
5. "object" | |
6. 10 | |
7. 7 | |
8. false | |
9. "10" | |
10. 28 | |
11. -1 | |
12. [ "c" ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment