Home Articles FAQs XREF Games Software Instant Books About Feedback Search Site-Map
irt.org logo

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



Provide feedback ...
AddThis Social Bookmark Button

Provide feedback ... AddThis Social Bookmark Button


Last Updated: 21st December 2007. Maintained by: Martin Webb
irt.org liability, trademark, document use, privacy statement and software licensing rules apply.
Copyright © 1996-2008 irt.org, All Rights Reserved.