When there is nesting, a break statement only terminates the innermost loop.
break
Additional information about breaking out of a nested loop