Skip to content

Instantly share code, notes, and snippets.

@mitogh
Created June 22, 2015 13:34
Show Gist options
  • Save mitogh/b07ec1febcac9007f95e to your computer and use it in GitHub Desktop.
Save mitogh/b07ec1febcac9007f95e to your computer and use it in GitHub Desktop.
JS Puzzle
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