Created
June 22, 2015 13:34
-
-
Save mitogh/b07ec1febcac9007f95e to your computer and use it in GitHub Desktop.
JS Puzzle
This file contains hidden or 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
Interesting Javascript puzzle (from a recent programming contest): | |
How do you create a number 100000000000000000000 in Javascript using only these four characters: '+', '!', '[', ']' and you can only use at most 60 such characters? | |
Some hints: | |
+!![] is equal to number 1 | |
+!![]+!![] is equal to number 2 | |
(don't answer if you participated in that contest) | |
FYI, the answer is super tricky and close to "cheating". |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment