0
please clear my confusion ? break statement
what happens when break statement is executed? where is control transferred now? inside of INNER FOR LOOP or inside of OUTER FOR LOOP or out of all loops for(outer loop) { for(inner loop) { if(condition) { break; } } }
4 odpowiedzi
+ 4
Bibek Pant , you break only the inner loop in your example. The outer loop will still run.
+ 2
A break always breaks only the nearest loop
+ 1
TheWh¡teCat 🇧🇬 Davide thanks mates !
0
Welcome 🤗