Skip to content

Instantly share code, notes, and snippets.

@trey
Created March 31, 2009 20:29
Show Gist options
  • Save trey/88393 to your computer and use it in GitHub Desktop.
Save trey/88393 to your computer and use it in GitHub Desktop.
Switch statement in JavaScript.
switch(id){
case "previous":
// something
break;
case "next":
// something
break;
default:
// something
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment