Inspired by A JavaScript Journey With Only Six Characters
" An esoteric programming style of JavaScript where code is written using a very limited set of characters: ( , ) , [ , ] , + , ! "
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
0 - 9
{, }, (, ), [, ]
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
0 - 9
{, }, (, ), [, ]
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
0 - 9
{, }, (, ), [, ]
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
0 - 9
{, }, (, ), [, ]
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
0 - 9
{, }, (, ), [, ]
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
0 - 9
{, }, (, ), [, ]
![] === false
+[] === 0
[]+[] === ""
"hello"[0] === "h"
+("1" + "1") === 11
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'
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
![]+[] === "false"
+!![] === 1
------------------------
(![]+[])[+!![]] === "a" // same as "false"[1]
[][[]] + [] === "undefined"
[][[]] + [] // "undefined"
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
{, }, (, ), [, ]
[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
{, }, (, ), [, ]
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
{, }, (, ), [, ]
(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
{, }, (, ), [, ]
"test"["bold"]() === "<b>test</b>"
function Function() { [native code] }
The constructor of any function is
the actual Function object itself
[]["fill"]["constructor"] === Function
Function("alert('test')");
produces
Function anonymous() {
alert('test')
}
[]["fill"]["constructor"]("return escape('<')")()[2] === "C"
""["constructor"]["fromCharCode"](65) === "A"
""["constructor"]["fromCharCode"](46) === "."
([]['map']+[])[+((+!![]+[])+(+!![]))]+(![]+[])[(+!![])]+([]['join']+[])[(+!![]+!![]+!![]+!![]+!![]+!![]+!![])]+((![]+[+![]])+String)[+(((+!![])+(+!![]))+[]+(+![]))]+(!![]+[])[(+!![])+(+!![])+(+!![])]+(![]+[])[(+!![])]
http://jazcash.com/a-javascript-journey-with-only-six-characters/
"test"["bold"]() === "<b>test</b>"