JavaScript
🔁 Loops
Repeat tasks without writing the same code over and over: for, while, for...of and more.
What you'll learn
- Iterate over a known range with a
forloop and accumulate a result inside it. - Choose between
whileanddo...whilebased on the condition, avoiding infinite loops. - Iterate over collections with
for...of(values) andfor...in(keys) depending on the case. - Control a loop's flow with
breakandcontinue.
Lessons
The classic for loopRepeat a block a known number of times. while and do...whileRepeat while a condition holds. for...of, for...in, break and continueIterate over collections and control the loop's flow.Practice this module in the app
DevPath is a hands-on course: you read the theory here; in the app you put it into practice with exercises that really run, offline.
Start free in the app →