9.7. Terminating a Loop With break
/*This loop executes 12 times, for values of i from 0 to 11. During the
twelfth iteration, i is 11 and the condition i > 10 evaluates to true
for the first time and execution reaches the break statement. The loop
is immediately terminated at that point.*/
for (let i = 0; i < 42; i++) {
// rest of loop body
if (i > 10) {
break;
}
}