In which conditions continue and break loops shows error...can anyone plz clear me | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

In which conditions continue and break loops shows error...can anyone plz clear me

7th Oct 2020, 6:02 PM
Muhtasinul
Muhtasinul - avatar
4 Answers
+ 7
example Are you using JavaScript? if yes: while(true){ //code here break;//this breaks the loop } //code here
7th Oct 2020, 6:51 PM
Galaxy-Coding (inactive)
Galaxy-Coding (inactive) - avatar
+ 4
Please attach a code bit. Usually the dont produce an error until or unless your using it outside a loop
7th Oct 2020, 6:04 PM
Steve Sajeev
Steve Sajeev - avatar
+ 3
The break or continue is only used in loops. It is made like that.. Because there is no use of break or continue outside a loop
7th Oct 2020, 6:10 PM
Steve Sajeev
Steve Sajeev - avatar
0
Yeah...why does it shows outside the loop..thats my prob...i am facing the problem seriously
7th Oct 2020, 6:08 PM
Muhtasinul
Muhtasinul - avatar