# explain break vs continue statement like I'm 5

**URL:** <https://forum.kirupa.com/t/explain-break-vs-continue-statement-like-im-5/659557>\
**Category:** programming\
**Created:** [June 22, 2023, 4:38pm UTC](https://forum.kirupa.com/t/explain-break-vs-continue-statement-like-im-5/659557 "2023-06-22T16:38:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![polaryeti](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/polaryeti/32/19283_2.png) [@polaryeti](https://forum.kirupa.com/u/polaryeti)\
**Post date:** [June 22, 2023, 4:38pm UTC](https://forum.kirupa.com/t/explain-break-vs-continue-statement-like-im-5/659557/1 "2023-06-22T16:38:05Z")

</div>

This is what I understand.  
break totally exits the loop, no next iteration.  
continue cancels anything below “continue” and goes to next iteration.  
This confuses the hell out of me. Can you guide me in an easy way?

---

<div class="post-metadata">

**Author:** ![kirupa](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/kirupa/32/11616_2.png) [@kirupa](https://forum.kirupa.com/u/kirupa)\
**Post date:** [June 23, 2023, 4:16am UTC](https://forum.kirupa.com/t/explain-break-vs-continue-statement-like-im-5/659557/2 "2023-06-23T04:16:09Z")

</div>

You have it right!

“Break” is like saying, “I’m done with this game, let’s go do something else.” When you use “break” in JavaScript, it means you want to stop doing the tasks or going through the line of toys. You can leave the game and do something different.

On the other hand, “continue” is like saying, “Okay, I’m done with this toy, let’s move on to the next one.” When you use “continue” in JavaScript, it means you want to skip the current task or toy and go directly to the next one. You don’t stop playing the game, but you move on to the next thing without finishing what you were doing before.

So, “break” means you want to stop and do something else entirely, while “continue” means you want to skip the current thing you are fiddling with move on to the next one in the same category of things you are doing.

---

<div class="post-metadata">

**Author:** ![polaryeti](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/polaryeti/32/19283_2.png) [@polaryeti](https://forum.kirupa.com/u/polaryeti)\
**Post date:** [June 23, 2023, 5:47am UTC](https://forum.kirupa.com/t/explain-break-vs-continue-statement-like-im-5/659557/3 "2023-06-23T05:47:15Z")

</div>

thanks @kirupa
