Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Switch Default
switch (num) {
case 1:
'do your stuff';
break;
default:
case 2:
'do other stuff';
break;
case 3:
'more stuff';
break;
}
@hdragomir
Copy link
Author

hdragomir commented Oct 10, 2012

That moment when you realize your default case does not need to be at the end!

@gorenje
Copy link

gorenje commented Oct 10, 2012

+1 for obfuscation!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment