Created
September 4, 2014 22:28
-
-
Save sirpengi/2131dfb79bbdc29f5240 to your computer and use it in GitHub Desktop.
wtf javascript
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
var assert = require("assert"); | |
assert.equal( | |
({lol: 'LOL', javascript: 'JAVASCRIPT'})['lol', 'wtf', 'javascript'], | |
"JAVASCRIPT" | |
); | |
assert.equal( | |
({lol: 'LOL', javascript: 'JAVASCRIPT'})[['javascript']], | |
"JAVASCRIPT" | |
) | |
assert.equal( | |
({lol: 'LOL', javascript: 'JAVASCRIPT'})[[[[[['javascript']]]]]], | |
"JAVASCRIPT" | |
) | |
var b = [[[[[[[[[['javascript']]]]]]]]]]; | |
assert.equal( | |
({lol: 'LOL', javascript: 'JAVASCRIPT'})[b], | |
"JAVASCRIPT" | |
) | |
assert.equal( | |
({lol: 'LOL', javascript: 'JAVASCRIPT'})[[b]], | |
"JAVASCRIPT" | |
) | |
assert.equal( | |
({lol: 'LOL', javascript: 'JAVASCRIPT'})['lol', 'wtf', b], | |
"JAVASCRIPT" | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Best Riven CN