0
How can i test for two variables at the same time using switch in javascript ?
Now I wanna test two different variables for a one single series of cases using the switch option. I don't got any better words to explain it
2 Respostas
+ 3
Don't know it's helpful or not but you can try nested switch case.
int i=0;
int x=1;
switch (i)
{
case 1:
System.out.println("Number Zero");
break;
default:
switch (x)
{
case 1:
System.out.println("Number One");
}
}