This page contains all of the posts and discussion on MemeStreams referencing the following web page: #@x!?ing JavaScript. You can find discussions on MemeStreams as you surf the web, even if you aren't a MemeStreams member, using the Threads Bookmarklet.
#@x!?ing JavaScript by Acidus at 5:47 pm EDT, Aug 17, 2007
var c=2;
var x=2;
switch(x) {
case 1:
alert("In 1");
break;
case c:
alert("In 2");
break;
default:
alert("default");
}
//displays 2!
In JavaScript you can define case blocks with expressions. ... wow... I mean... just wow.