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

3rd May 2020, 11:02 AM
Shreyansh Shah
Shreyansh Shah - avatar
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"); } }
3rd May 2020, 12:04 PM
0_O-[Mägár_Sám_Äkà_Nüllpøïntêr_Èxëcéptïön]~~
0_O-[Mägár_Sám_Äkà_Nüllpøïntêr_Èxëcéptïön]~~ - avatar