Control Flow
Break and Continue
for (let i = 1; i <= 10; i++) {
if (i === 3) continue; // skip 3
if (i === 6) break; // stop completely at 6
console.log(i);
}Output
1 2 4 5
breakexits the loop immediately.continueskips the rest of this round and goes to the next one.