Last active
February 9, 2018 16:54
-
-
Save adamabernathy/8ebf6176807a4bdf179916503a089da7 to your computer and use it in GitHub Desktop.
Removing JS "labelled" statement part 2
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
// A bit cleaner now | |
let keepRunning = true; | |
for (let i = 0, li = 5; keepRunning && i < li; i++) { | |
for (let j = 0, lj = 5; keepRunning && j < lj; j++) { | |
for (let k = 0, lk = 5; keepRunning && 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