I know that using multiple values in a switch case should mean you ought to be using an if-else setup but this is more of a theory question than a practicality.
My question is thus:
switch(x){
case 4:
break;
case 5 || 6:
break;
}
The above 5 || 6
illustrates the case firing on either x being 5 or 6.
Is this at all possible?
Aucun commentaire:
Enregistrer un commentaire