PDA

Click to See Complete Forum and Search --> : A questions about if's (Java Script)


Frankie902
Feb 22nd, 2001, 07:48 PM
Is there any kind of "end if" in java script? Is there a way if putting an if into an if? Is there anything like "Cases" from basic, in Java Script?

Feb 22nd, 2001, 07:56 PM
Yes, you can put IF inside of IF, and you can use Case statement also. Check this http://msdn.microsoft.com/scripting/default.htm

Psyrus
Feb 25th, 2001, 03:15 PM
The JavaScript version of the Select Case is:

switch(n){

case 1: //n=1

//Do something

break;


case 2: //n=2

//Do something

break;


default:

//Do something

break;

}