Answers for "switch case with 2 cases"

1

How to use two case statements as one case statement in switch case

case text1: 
  case text4:{
            //blah
            break;
        }
Posted by: Guest on February-28-2022
0

switch case same code for 2 cases

switch (myVar) {
  case 68:
  case 40:
    // Do stuff
  break;

  case 30:
    // Do stuff
  break;
}
Posted by: Guest on October-27-2021

Browse Popular Code Answers by Language