Skip to content

Instantly share code, notes, and snippets.

@RichardLitt
Created December 13, 2014 19:48
Show Gist options
  • Save RichardLitt/a43c7cdee179e2cef643 to your computer and use it in GitHub Desktop.
Save RichardLitt/a43c7cdee179e2cef643 to your computer and use it in GitHub Desktop.
var iterator = 10;
iLoop: for (var i = 0; i < iterator; i++) {
yLoop: for (var y = 0; y < iterator; y++ ) {
console.log('i and y:', i, y)
testing: if (y==5) {
console.log('This will break the outside loop!');
break iLoop;
console.log('This will never appear.');
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment