Why using break out side of loop cause an error | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 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 Respostas
+ 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