0
Can anyone explain , how a continue statement works and what is break , what is the relation btw this two.
I'm confused
2 Answers
+ 5
Akhil Nair
>The break statement allows you to leave a for or while loop prematurely.
>The continue statement ignores the rest of the statements inside a loop, and continues with the next iteration.Â
+ 3
*Break* statement breaks the loop(i.e. control goes outside the loop) whereas, whenever *continue* is encountered system skips that iteration and continues execution of other statements.
see this code for more understandingđ
https://code.sololearn.com/c5imZISk9vV0/?ref=app