Break and continue
Control loop flow explicitly:
for (let i = 0; i < 10; i++) {
if (i === 3) continue; // skip to next iteration
if (i === 6) break; // exit the loop entirely
console.log(i);
}
// 0 1 2 4 5
break exits the loop; continue skips the rest of the current iteration. Prefer find/some/every on arrays over manual loops when you only need to search.