102

JSFuck - Write any JavaScript with 6 Characters: []()!+

 6 years ago
source link: http://www.jsfuck.com/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Write any JavaScript with 6 Characters: []()!+

JSFuck

()+
[]!

JSFuck is an esoteric and educational programming style based on the atomic parts of JavaScript. It uses only six different characters to write and execute code.

It does not depend on a browser, so you can even run it on Node.js.

Use the form below to convert your own script. Uncheck "eval source" to get back a plain string.

Eval Source
Run In Parent Scope
2345 chars Run This

Links

Alternatives

Basics

  • false => ![]
  • true => !![]
  • undefined => [][[]]
  • NaN => +[![]]
  • 0 => +[]
  • 1 => +!+[]
  • 2 => !+[]+!+[]
  • 10 => [+!+[]]+[+[]]
  • Array => []
  • Number => +[]
  • String => []+[]
  • Boolean => ![]
  • Function => []["filter"]
  • eval => []["filter"]["constructor"]( CODE )()
  • window => []["filter"]["constructor"]("return this")()

See the full list here.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK