Control loop execution with break and continue.
Source Code
for (let i = 0; i < 10; i++) {
if (i === 5) {
break; // Exits the loop
}
if (i % 2 === 0) {
continue; // Skips the rest of the loop and continues with the next iteration
}
console.log(i); // 1, 3
}