samedi 5 avril 2014

How to use the or operator ( in switch statements


Vote count:

0




Lets say I have a variable a that can be es or es-mx (spanish and mexican spanish). How can I check for both in a switch statement in one case, like



switch(a)
{
case 'es' || 'es-mx':
//Code
break;
//more case's
}


asked 41 secs ago






Aucun commentaire:

Enregistrer un commentaire