You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: 1-js/02-first-steps/13-while-for/article.md
+4-2Lines changed: 4 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -363,12 +363,14 @@ Labels do not allow us to jump into an arbitrary place in the code.
363
363
364
364
For example, it is impossible to do this:
365
365
```js
366
-
break label; // doesn't jumps to the label below
366
+
break label; // jump to the label below (doesn't work)
367
367
368
368
label: for (...)
369
369
```
370
370
371
-
A call to `break/continue` is only possible from inside a loop and the label must be somewhere above the directive.
371
+
A call to `continue` is only possible from inside the loop.
372
+
373
+
The `break` directive may be placed before code blocks too, as `label: { ... }`, but it's almost never used like that. And it also works only inside-out.
0 commit comments