Skip to content

Instantly share code, notes, and snippets.

@tkihira
Created March 22, 2012 18:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tkihira/2161538 to your computer and use it in GitHub Desktop.
Save tkihira/2161538 to your computer and use it in GitHub Desktop.
goto implementation on JavaScript
var gotoLabel;
do {
switch(gotoLabel) {
default:
/* code here... */
gotoLabel = "label1"; break; /*goto lable1*/
case "label1":
/* code here... */
gotoLable = null;
}
} while(gotoLabel);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment