The break statement is used to break out of a loop statement i.e. stop the execution of a looping statement, even if the loop condition has not becomeFalse or the sequence of items has been completely iterated over.
An important note is that if you break out of afor orwhile loop, any corresponding loopelse block is not executed.