Skip to content

Instantly share code, notes, and snippets.

@jaenster
Created October 3, 2020 01:45
Show Gist options
  • Save jaenster/1ad5edecf2cd3c0b2a2c9481a5522c83 to your computer and use it in GitHub Desktop.
Save jaenster/1ad5edecf2cd3c0b2a2c9481a5522c83 to your computer and use it in GitHub Desktop.
How to do a GoTo in javascript
let i = 0;
/*ignore*/_goto: {do {
GoTo: {
if (i != 4) {
i++;
break GoTo;
}
/*ignore*/break _goto;}} while (true)};
console.debug(i); // 4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment