Loading...
Loading...
Loading Curriculum...
Loading Subject...
Loading Topic...
Loading Lesson...
Loading Lab...
Loop control statements change the execution flow from its normal sequence. They allow you to exit loops early or skip specific iterations.
breakExits the loop immediately
if (i == 5) break;continueSkips current iteration and moves to next
if (i % 2 == 0) continue;gotoJumps to a labeled statement (avoid using)
goto error_handler;A break only exits the innermost loop. To exit multiple nested loops, you might need a flag variable or a goto (though rare).