Brainfuck like Javascript
Saturday, September 10, 2011 4:37:24 PM
Eat this!
([][(![]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]+(!![]+[])[+[]]][([][(![]+[])[+[]]+(![]+[]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[!+[]+!+[]]]()[(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]+(!![]+[])[+[]]])((![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[][(![]+[])[+[]]+(![]+[]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]])Just copy that code, type javascript: into the address bar, paste the code after it and press enter to see what it does - or put it in script tags on one of your web pages.
Yes, the above code is indeed JavaScript, even if it reminds a little bit of Brainfuck.
It works because:
++[[]][+[]] == 1If you want to know why, just read this comment from John Resig.
PS: No, you won't buy a washing machine if you test the above code

PPS: Of course I cheated and used a converter for it, because I am not that good in writing JavaScript, I hardly understand why it works like it does







Cutting Spoonhellspork # Friday, October 7, 2011 11:43:20 PM
DitherDitherSky # Sunday, February 19, 2012 12:33:55 AM
QuHno # Sunday, February 19, 2012 7:20:28 PM
... the miracles of the changed JIT Javascript compiler, it interprets some things slightly different - try it with 11.52