Skip to content

Instantly share code, notes, and snippets.

@zackdouglas
Created January 12, 2012 05:06
Show Gist options
  • Save zackdouglas/1598898 to your computer and use it in GitHub Desktop.
Save zackdouglas/1598898 to your computer and use it in GitHub Desktop.
Convoluted JS Switch Statement
var r = [ ( function (l, r) { return l + r; } ),
( function (a, b) { return '' + a + b; } )]
[ [ 0, 1 ].indexOf( 0 + /PHPSESSID/.test(document.cookie) ) ](1,2);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment