JS WTFs

Today we are going to flog a dead horse. Over the time I have bookmarked several JS WTFs and would like to share some of the best ones. Javascript can never stop to amaze people.

Alerts “fail”. Read why this works. Another similar StackOverflow topic.

alert((![]+[])[+[]]+(![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]);

Obligatory link: WAT Talk.