ttomasko
Programmer
- Aug 6, 2008
- 28
Hello,
Is it possible to use the switch statement with inequalities?
For instance, the following does not work.
Tom
Is it possible to use the switch statement with inequalities?
For instance, the following does not work.
Tom
Code:
var x = 4;
switch(x){
case <5:
alert("do something");
break;
case 5:
alert("do something more");
break;
case >5:
alert("do something really big");
break;
}//end switch