A jump statement can be used to transfer program control using keywords such as break
, continue
, return
, and throw
.
break
A break
statement is used to exit from a case in a switch
statement and also used to exit from
for
foreach
while
do-while
loops that will switch the control to the statement immediately after the end of the loop.
Get hands-on with 1400+ tech skills courses.