Write any JavaScript with 6 Characters: []()!+
demo : jsfuck.com
fork from : https://github.com/aemkei/jsfuck.git

Martin Kleppe 4a19c5b30b Update README.md %!s(int64=10) %!d(string=hai) anos
test d5d4057c71 Update lengths %!s(int64=11) %!d(string=hai) anos
.gitignore efc8b2339e Add tests %!s(int64=11) %!d(string=hai) anos
.npmignore efc8b2339e Add tests %!s(int64=11) %!d(string=hai) anos
Gruntfile.js efc8b2339e Add tests %!s(int64=11) %!d(string=hai) anos
LICENSE.txt 570ecd3b1b Add license file. %!s(int64=13) %!d(string=hai) anos
README.md 4a19c5b30b Update README.md %!s(int64=10) %!d(string=hai) anos
favicon.ico 611c29efa5 Add preview and favicon. %!s(int64=13) %!d(string=hai) anos
fuck.js 6069cfff72 add repl to executable %!s(int64=11) %!d(string=hai) anos
index.html b2dae714ba Allow running generated code in parent scope %!s(int64=10) %!d(string=hai) anos
jsfuck.js b5e11779c4 Merge pull request #36 from hazzik/remove-redundant-J %!s(int64=10) %!d(string=hai) anos
output.txt b5e11779c4 Merge pull request #36 from hazzik/remove-redundant-J %!s(int64=10) %!d(string=hai) anos
package.json a3d5a5e5ae Bump version. %!s(int64=11) %!d(string=hai) anos
preview.png 611c29efa5 Add preview and favicon. %!s(int64=13) %!d(string=hai) anos

README.md

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.

Demo: jsfuck.com

Example

The following source will do an alert(1):

[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[
]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]
])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+
(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+
!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![
]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]
+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[
+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!!
[]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![
]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[
]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((![]+[])[+!+[]]+(![
]+[])[!+[]+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]+(!![]+[])[+[]]+(!
[]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])
[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]+[+!+[]]+(
!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[
])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]])()

Basics

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

See the full list here.

Links

Analytics