Skip to content

Instantly share code, notes, and snippets.

@ConorSheehan1
Last active November 12, 2020 14:27
Show Gist options
  • Save ConorSheehan1/f616692b14bf7b43989ecc8c37bed629 to your computer and use it in GitHub Desktop.
Save ConorSheehan1/f616692b14bf7b43989ecc8c37bed629 to your computer and use it in GitHub Desktop.
javascript abuse, self describing code because it is itself naff. A coworker shared the fail example with me so I expanded a bit.
// example: https://jsfiddle.net/conorsheehan1/vqdfsh31/
// runnable in any browser console
// fail (coworker showed me this one)
(![] + [])[+[]] + (![] + [])[+!+[]] + ([![]] + [][[]])[+!+[] + [+[]]] + (![] + [])[!+[] + !+[]];
// Naff
((![] + [][[]]) + [])[+[]] + ((![] + [][[]]) + [])[+!+[]] + (![] + [])[+[]] + (![] + [])[+[]];
// Nooo
((![] + [][[]]) + [])[+[]] + ({} + {})[+!+[]] + ({} + {})[+!+[]] + ({} + {})[+!+[]];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment