Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

case or switch 1

Status
Not open for further replies.

jscorpion

Programmer
Nov 17, 2000
40
US
I am new to javascript and was wondering if you are able to use case statements in javascript. I know javascript is a lot like c++, and I need to know if a switch statement is accepted. I would also like a quick example if neccessary. I have looked in my documentation, but cannot seem to find any info on this.

Thank you,

jscorpion
 
switch(i)
{
case 1:
//code;
break;
case 2:
//code;
break;
default:
//code;
break;
} adam@aauser.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top