Skip to content

Instantly share code, notes, and snippets.

@wwgist
Created June 18, 2013 06:36
Show Gist options
  • Save wwgist/5803102 to your computer and use it in GitHub Desktop.
Save wwgist/5803102 to your computer and use it in GitHub Desktop.
JS: switch
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