OZONE Asylum
Forums
DHTML/Javascript
complex switch case
This page's ID:
27696
Search
QuickChanges
Forums
FAQ
Archives
Register
Edit Post
Who can edit a post?
The poster and administrators may edit a post. The poster can only edit it for a short while after the initial post.
Your User Name:
Your Password:
Login Options:
Remember Me On This Computer
Your Text:
Insert Slimies »
Insert UBB Code »
Close
Last Tag
|
All Tags
UBB Help
[quote] [b]liorean said:[/b] Well, there's this structure:code:switch(true){ case (a==1||a==2): dosomething(); break; case (a==2||a==3): dootherthing(); break; case (a>3) dosomething(); if(a>4) dootherthing(); break;}Though there is absolutely NO benefit to using that structure as compared to using multiple if-statements.-- var Liorean = { abode: "http://codingforums.com/", profile: "http://codingforums.com/member.php?u=5798"}; [/quote] Yeah, for sure... I'm back to the if statements...:rolleyes:
Loading...
Options:
Enable Slimies
Enable Linkwords
« Backwards
—
Onwards »