Will the break statement also end the if,else if,else statement? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Will the break statement also end the if,else if,else statement?

18th Aug 2016, 11:14 PM
Segun Aremu
Segun Aremu - avatar
3 Answers
+ 3
Yes - but it will halt the whole script also.
25th Aug 2016, 5:44 AM
Diana Pencheva
0
ya I agree with u @segun aremu
12th Oct 2016, 5:30 PM
Tanmay Sonna
Tanmay Sonna - avatar
0
if you do that, you will get a fatal error msg, the break only works inside a switch :)
25th Nov 2016, 10:11 AM
Eduardo Bettencourt
Eduardo Bettencourt - avatar