I'm not sure what is happening in this line of javascript:
alert( (''+[][[]])[!+[]+!+[]] ); // shows "d"
What I've figured out:
var a = ! + []; // == true
var b = ! + [] + ! + []; // == 2
It seems that the second part is a reference into an array of letters or some sort, but I don't understand how that is coming from
(''+[][[]])
Also:
alert( (''+[][])[2] ); // nothing happens; console says "unexpected token ]"
alert( (''+[[]][])[2] ); // nothing happens; console says "unexpected token ]"
alert( (''+[[]][[]])[2] ); // shows "d"
alert( (""+true)[2] ); // shows "u"