+ 1

Why using break out side of loop cause an error

What error happen

19th Jun 2018, 7:37 PM
Mate M
Mate M - avatar
2 Respuestas
+ 5
Hello, Mate M ! In what programming language, do you want to solve this? Please write, and different people can help you
19th Jun 2018, 7:48 PM
Alexander Sokolov
Alexander Sokolov - avatar
+ 2
(Break statement) is used to exit from a loop or a switch immediately whenever a break statement is encountered and the program control goes to the next statement following the loop. How can you justify its usage using it outside the loop? And also when there is no such logic or requirement using it there!
19th Jun 2018, 9:37 PM
Oshin Bajaj
Oshin Bajaj - avatar