Our Beloved JavaScript can be very weird...
(![] + [])[+!+[] + +!+[]] // 'l'
+ (![] + [])[+!+[]] // 'a'
+ ([![]] + [][[]])[+!+[] + [+[]]] // 'i'
+ ([][[]] + [])[+!+[] + +!+[]] // 'd'
// Will output "laid"
The reason why JavaScript produces this output mainly depends on type casting of array and ability of + to cast 'things' into string. ![] // false while +[] // 0 my question is how did JavaScript successfully parse [][[]] to be undefined but reject [][][] as syntax error