Last active
February 9, 2018 16:54
-
-
Save adamabernathy/bef62c35b41a04dd1b566805d1d27206 to your computer and use it in GitHub Desktop.
Removing JS "labelled" statement part 1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
// The basic idea | |
let keepRunning = true; | |
for (let i = 0, li = 5; i < li; i++) { | |
if (!keepRunning) break; | |
for (let j = 0, lj = 5; j < lj; j++) { | |
if (!keepRunning) break; | |
for (let k = 0, lk = 5; k < lk; k++) { | |
if (k == 3) { | |
keepRunning = false; | |
break; | |
} | |
for (let m = 0, lm = 5; m < lm; m++) { | |
console.log(i, j, k, m); | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment