+ 1
Loop-Ception + Break = ???
What happens if you put a loop within another loop and use a break statement? Would it only exit the inner loop, or exit both loops?
2 Respuestas
+ 4
depends on where you put the break statement
+ 3
A break statement exits the current loop it's in. Meaning yes, it exits the inner loop.