a statement that does something repeatedly.
Last updated 2 years ago
Was this helpful?
JS โฉ statement โฉ loop
(statement) does something repeatedly.
continue ๏ผ skips to the next iteration of the current/labeled loop.
break๏ผbreaks the current / or statement entirelyโ
๐
(nested loop)
statement is needed
/ won't operate across an function boundary to control an outer loop/.
๐
loops
while / do...while
for loops๏ผ for / for-of / /
iteration
Loops and iteration
when you want to break out of a statement that is not the nearest enclosing loop / switch.