Created
March 10, 2015 14:27
-
-
Save marcelaraujo/eadd1e246ff4dd0b308c to your computer and use it in GitHub Desktop.
Javascript labeled loop
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
| var i = 0, | |
| j = 8; | |
| checkiandj: while (i < 4) { | |
| console.log("i: " + i); | |
| i += 1; | |
| checkj: while (j > 4) { | |
| console.log("j: "+ j); | |
| j -= 1; | |
| if ((j % 2) == 0) | |
| continue checkj; | |
| console.log(j + " is odd."); | |
| } | |
| console.log("i = " + i); | |
| console.log("j = " + j); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment