So I participated in a Capture The Flag this week and one of the challenges really confused me.
Preview:
[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+
This was the file given, it reminded me of this, after playing with it for a bit I entered it into the JavaScript console on my browser and an alert with the flag popped up.
If someone could explain why this works, and how I could create something like this. Also is it simple to translate this into normal looking JavaScript, I just imagine this could be a way for an attacker to execute sketchy code in my browser.