Feedback on: irt.org FAQ Knowledge Base Q1618
Worth:
Worth reading
Comments:
Found a better way to make switch statements apply for ranges.
var x = 2
switch (true) {
case (1 > x):
alert("1 > x")
break;
case ((1 < x)&&(x < 3)):
alert("Pass")
break;
case (x > 3):
alert("x > 3")
break;
default:
alert("Oh boy")
}
8-D
Worth:
Not worth reading
Comments:
Sorry but you clowned around with Microsoft standed arsefoolery, all you needed to do is:
case 1-5 :
alert("between 1 and 5")
break;
Worth:
Not worth reading
Comments:
standard* - it's late and I'm tired :P