continue has nothing to do with switch es, not in Javascript and not in C ++ :
int main() { int x = 5, y = 0; switch (x) { case 1: continue; case 2: break; default: y = 4; } }
error: continue statement not in a loop
If you want to exit the enclosure, use break ; otherwise let the case fail:
switch ("B") { case "A": break; case "B": case "C": break; default: break; }
If you are looking for a shortcut to move on to the next case, no, you cannot do this.
switch ("B") { case "A": break; case "B": if (something) { continue;
source share