chinchang / chinchang/web-maker

when trying to use labels in loops... i get this in the console "SyntaxError: Undefined label"

Open
#242 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
2.7k
Forks
323
PR merge metrics
No merged PRs in 30d

Description

when trying to use labels in loops... i get this in the console "SyntaxError: Undefined label"
but it works in codepen and jsbin

this is the code

```
var x = 0;
var z = 0;

myLoop:

while(true) {
document.write("Outer Loops" + x + "........
");
x++;

z = 1;
while(true){
document.write("Inner Loops" + z + "........
");
z++;
if (x === 10 && z === 10) {
break myLoop;
}
else if(z === 10) {
break;
}
}
}
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.