Loops are the engine of repetition in programming. Instead of writing the same line of code 100 times, you write it once and tell JavaScript to repeat it. In this lesson you'll learn every loop type JavaScript offers — when to use each one, how to control them with break and continue, and how to avoid the dreaded infinite loop.
1-B 2-B 3-B 4-B | 5 update (i++) 6 iteration 7 = for(let i=1;i<=5;i++) console.log(i) 8 = let s=0; for(const n of arr) s+=n; // 12 9 = 0 10 20 | 10 = Add i++ inside the loop