In the following code, does the break statement break out of the if statement only or out of the for loop too?
break
if
for
I need it to b
That would break out of the for loop. In fact break only makes sense when talking about loops, since they break from the loop entirely, while continue only goes to the next iteration.
loops
loop
continue
iteration