5.4.10. jsfuck cheat sheet

5.4.10.1. Basic values

  • undefined > [][[]]

  • false > ![]

  • true > !![]

  • NaN > +[![]]

  • 0 > +[]

  • 1 > +!+[]

  • 2 > !+[]+!+[]

5.4.10.2. Basic strings

  • '' > []+[]

  • 'undefined' > []+[][[]]

  • 'false' > []+![]

  • 'true' > []+!![]

  • 'NaN' > []+(+[![]])

  • '0' > []+(+[])

  • '1' > []+(+!+[])

  • '2' > []+(!+[]+!+[])

  • '10' > [+!+[]]+[+[]]

  • '11' > [+!+[]]+[+!+[]]

  • '100' > [+!+[]]+[+[]]+(+[])

5.4.10.3. Higher numbers

  • 10 > +([+!+[]]+[+[]])

  • 11 > +([+!+[]]+[+!+[]])

  • 100 > +([+!+[]]+[+[]]+(+[]))

5.4.10.4. String alphabet

  • 'a' > ([]+![])[+!+[]]

  • 'd' > ([]+[][[]])[+!+[]+!+[]]

  • 'e' > ([]+!+[])[+!+[]+!+[]+!+[]]

  • 'f' > ([]+![])[+[]]

  • 'i' > ([]+[][[]])[+!+[]+!+[]+!+[]+!+[]+!+[]]

  • 'l' > ([]+![])[+!+[]+!+[]]

  • 'n' > ([]+[][[]])[+!+[]]

  • 'r' > ([]+!+[])[+!+[]]

  • 's' > ([]+![])[+!+[]+!+[]+!+[]]

  • 't' > ([]+!+[])[+[]]

  • 'u' > ([]+!+[])[+!+[]+!+[]]