" An esoteric programming style of JavaScript where code is written using a very limited set of characters: ( , ) , [ , ] , + , ! "

What the F%#* is JSF%#*?

WAT


![] === false
+[] === 0
[]+[] === ""


"hello"[0] === "h"


+("1" + "1") === 11

JavaScript "Basics"

We Need...

a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z

{, }, (, ), [, ]


![]+[] // 'false'
!![]+[] // 'true'

(![]+[])[0] // 'f'

Let's Start...

a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z

{, }, (, ), [, ]

So...


![] === false
![]+[] === "false"
+!![] === 1
------------------------
(![]+[])[+!![]] === "a"  // same as "false"[1]



[][[]] + [] === "undefined"

[][[]] + [] // "undefined"

Let's Start...

a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z

{, }, (, ), [, ]

More JavaScript "Basics"


[2, 1]["sort"]() /* is the same as */ [2, 1].sort()


[]["fill"]+[] === "function fill() { [native code] }"

a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z

{, }, (, ), [, ]

Constructor


true["constructor"] + [] === "function Boolean() { [native code] }" 
 
0["constructor"] + []    === "function Number() { [native code] }"  

""["constructor"] + []   === "function String() { [native code] }"

[]["constructor"] + []   === "function Array() { [native code] }"

a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z

{, }, (, ), [, ]

toString


(10)["toString"]() === "10"


(12)["toString"](10) === "12" // base 10

(12)["toString"](2) === "1100" // base 2, or binary, for 12

(12)["toString"](8) === "14" // base 8 (octonary) for 12

(12)["toString"](16) === "c" // hex for 12



(10)["toString"](36) === "a"

(35)["toString"](36) === "z"

a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z

{, }, (, ), [, ]

Punctuation & Capital Letters


"test"["bold"]() === "<b>test</b>"

Functions


function Function() { [native code] }

The constructor of any function is

the actual Function object itself


[]["fill"]["constructor"] === Function

Functions


Function("alert('test')");

produces


Function anonymous() {  
    alert('test')
}

The Rest...


[]["fill"]["constructor"]("return escape('<')")()[2] === "C"

""["constructor"]["fromCharCode"](65) === "A"

""["constructor"]["fromCharCode"](46) === "."

And Now...

What's It Good For?

The End


([]['map']+[])[+((+!![]+[])+(+!![]))]+(![]+[])[(+!![])]+([]['join']+[])[(+!![]+!![]+!![]+!![]+!![]+!![]+!![])]+((![]+[+![]])+String)[+(((+!![])+(+!![]))+[]+(+![]))]+(!![]+[])[(+!![])+(+!![])+(+!![])]+(![]+[])[(+!![])]

http://jazcash.com/a-javascript-journey-with-only-six-characters/

Punctuation & Capital Letters


"test"["bold"]() === "<b>test</b>"
Made with Slides.com