Obfuscated Javascript.Explained()

And this, of course, evaluates to the string “fail”.
— Marcus Lagergren (@lagergren) May 23, 2013

Rewrite to show the four (string)[subscript] uses:
 (![]+[])        [+[]]
+(![]+[])        [+!+[]]
+([![]] + [][[]])[+!+[]+[+[]]]
+(![]+[])        [!+[]+!+[]];

Then evaluate each color-coded expression:
![]+[]  => "false"
+[]    => "0"
+!+[]  => "1"
!+[]   => 1

That third string really exercises those square brackets!
[![]] + [][[]] => "falseundefined"

Finally, we’re ready to ‘fail’:
 f + a +  i + l

XKCD Subways of North America – with !

XKCD comic #1196 – Subways has a great map of the subways in North America linked up by some fantastic, mythical branch lines. I started collecting the actual maps for all of the subways, until I recalled that the The Urban Mass Transit Systems of North America map from Yale Professor Bill Rankin on his web site Radical Cartography (ca 2006) has already done the work. That map scales, rotates, and geographically maps the subway systems to allow for accurate comparisons. Mr. Munroe probably got his inspiration from that map!

In case you’re interested, here’s the collection:




San Francisco (BART)

San Francisco (MUNI)




New York, New Jersey (PATH)


Mexico City