4.2.8.3. jsfuck cheat sheet

4.2.8.3.1. Basic values

  • undefined > [][[]]
  • false > ![]
  • true > !![]
  • NaN > +[![]]
  • 0 > +[]
  • 1 > +!+[]
  • 2 > !+[]+!+[]

4.2.8.3.2. Basic strings

  • '' > []+[]
  • 'undefined' > []+[][[]]
  • 'false' > []+![]
  • 'true' > []+!![]
  • 'NaN' > []+(+[![]])
  • '0' > []+(+[])
  • '1' > []+(+!+[])
  • '2' > []+(!+[]+!+[])
  • '10' > [+!+[]]+[+[]]
  • '11' > [+!+[]]+[+!+[]]
  • '100' > [+!+[]]+[+[]]+(+[])

4.2.8.3.3. Higher numbers

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

4.2.8.3.4. String alphabet

  • 'a' > ([]+![])[+!+[]]
  • 'd' > ([]+[][[]])[+!+[]+!+[]]
  • 'e' > ([]+!+[])[+!+[]+!+[]+!+[]]
  • 'f' > ([]+![])[+[]]
  • 'i' > ([]+[][[]])[+!+[]+!+[]+!+[]+!+[]+!+[]]
  • 'l' > ([]+![])[+!+[]+!+[]]
  • 'n' > ([]+[][[]])[+!+[]]
  • 'r' > ([]+!+[])[+!+[]]
  • 's' > ([]+![])[+!+[]+!+[]+!+[]]
  • 't' > ([]+!+[])[+[]]
  • 'u' > ([]+!+[])[+!+[]+!+[]]