Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org

Feedback: irt.org FAQ Knowledge Base Q1618

Feedback on: irt.org FAQ Knowledge Base Q1618

Sent by Alex Vincent on May 01, 2001 at 13:27:59: - feedback #2680

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


Sent by Chris on January 06, 2003 at 23:39:29: - feedback #4348

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;


Sent by Chris (again) on January 06, 2003 at 23:40:55: - feedback #4349

Worth:
Not worth reading

Comments:
standard* - it's late and I'm tired :P


©2018 Martin Webb