0
plz explain me the concept of break used in while
2 Respuestas
+ 2
An infinity loop that never exits is a common programming bug. We use the «break» keyword to exit the loop. «Break» is a way of jumping out of a loop (in other words, stopping it) and it works with both WHILE and FOR loop.
0
On certain cases u need an infinite loop, but it should break on conditions so they defined break statement.