Skip to content

Instantly share code, notes, and snippets.

@VinnyFonseca VinnyFonseca/switch.js
Last active Dec 7, 2017

Embed
What would you like to do?
Switch Statement
switch(n) {
case 1: {
execute code block 1;
break;
}
case 2: {
execute code block 2;
break;
}
default: {
code to be executed if n is different from case 1 and 2;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.