Created
October 10, 2012 11:54
-
-
Save hdragomir/3865145 to your computer and use it in GitHub Desktop.
Switch Default
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
switch (num) { | |
case 1: | |
'do your stuff'; | |
break; | |
default: | |
case 2: | |
'do other stuff'; | |
break; | |
case 3: | |
'more stuff'; | |
break; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
That moment when you realize your default case does not need to be at the end!