---
title: "Discussion on \"♻️ JavaScript: Event Loop♻️\" | Hashnode"
description: "Discussion on \"♻️ JavaScript: Event Loop♻️\". Oh, boi🕺🏼the event loop. It’s one of those things that every JavaScript developer has to deal with in one way or another, but it can be a bit confusing to understand at first. \nIn one single sentence, let’s define what is the event loop:\n\nMoving ev..."
url: "https://hashnode.com/posts/javascript-event-loop/631f45156c86d75accc7e028"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [♻️ JavaScript: Event Loop♻️](https://chhakulizingare.hashnode.dev/javascript-event-loop?utm_source=hashnode&utm_medium=feed)

Oh, boi🕺🏼the event loop. It’s one of those things that every JavaScript developer has to deal with in one way or another, but it can be a bit confusing to understand at first. In one single sentence, let’s define what is the event loop: Moving ev...

Sep 12, 2022 · 4 min read · chhakulizingare.hashnode.dev  
Read the article

-   [#learncodeonline](https://hashnode.com/tag/learncodeonline)
-   [#iwritecode](https://hashnode.com/tag/iwritecode)
-   [#hiteshchoudharylco](https://hashnode.com/tag/hiteshchoudharylco)
-   [#javascript](https://hashnode.com/tag/javascript)
-   [#event-loop](https://hashnode.com/tag/event-loop)

## Written by

[Chhakuli Zingare](https://hashnode.com/@chhakuli)

@chhakuli · India

  
[View profile](https://hashnode.com/@chhakuli)

Software Engineer At Oraczen

Frontend Dev 🚀 | JavaScript ♥ | ReactJs ♥ | Next JS | Featured Technical Writer✍️

## Responses 13

Markdown supported · ⌘↵ to post

[Santosh more](https://hashnode.com/@santoshmore2690)

[Sep 16, 2022](https://hashnode.com/posts/javascript-event-loop/631f45156c86d75accc7e028/comment/63245ab0bc15ea8efdf5d22f)

keep writing

[Chhakuli Zingare](https://hashnode.com/@chhakuli)

[Sep 16, 2022](https://hashnode.com/posts/javascript-event-loop/631f45156c86d75accc7e028/comment/63245ab0bc15ea8efdf5d22f#reply-63246973dd55cd8b89b1c606)

Thank you and keep reading..

[Nagappan Subramanian](https://hashnode.com/@devnag)

[Sep 15, 2022](https://hashnode.com/posts/javascript-event-loop/631f45156c86d75accc7e028/comment/63232af255fb028b644299c7)

Simple good start up article for javascript developer

[Kumar Shubham](https://hashnode.com/@kshubham07)

[Sep 14, 2022](https://hashnode.com/posts/javascript-event-loop/631f45156c86d75accc7e028/comment/63215d6507b360723689c793)

This is just a great and super simplified explanation.

[Chhakuli Zingare](https://hashnode.com/@chhakuli)

[Sep 14, 2022](https://hashnode.com/posts/javascript-event-loop/631f45156c86d75accc7e028/comment/63215d6507b360723689c793#reply-632164195483096daa0a9fb3)

thank you

[Anirudh Jwala](https://hashnode.com/@theJwala)

[Sep 13, 2022](https://hashnode.com/posts/javascript-event-loop/631f45156c86d75accc7e028/comment/6320a32e5483096daa0a870e)

Fantastic! 👍🔥

[Chhakuli Zingare](https://hashnode.com/@chhakuli)

[Sep 14, 2022](https://hashnode.com/posts/javascript-event-loop/631f45156c86d75accc7e028/comment/6320a32e5483096daa0a870e#reply-6321354107b360723689c241)

Thank you❤❤❤❤...and Thank you for putting so much effort for us in the Bootcamp.

[Carlonn Rivers](https://hashnode.com/@Danidre)

[Sep 13, 2022](https://hashnode.com/posts/javascript-event-loop/631f45156c86d75accc7e028/comment/63208a375483096daa0a8220)

I have understood the generals of this for quite a while, but could not explain it. Now I better can!

I wonder if this is why you cannot use a while loop to block the thread while waiting for an asynchronous task to be completed. The browser delegates that task to another thread, and when that promise is resolved, it will place the response/callback in the event queue. However, if a while loop is ongoing (like `while (true)`) then it will keep iterating forever, placing its iterations into the call stack continuously.

Thus, the call stack will never be empty for the promise in the event loop to reach the call stack and proceed with the code.

Is my thought process correct here?

[Shubhdeep Chhabra](https://hashnode.com/@shubhdeep12)

[Sep 13, 2022](https://hashnode.com/posts/javascript-event-loop/631f45156c86d75accc7e028/comment/6320422d6c86d75accc80a91)

This is worth reading🚀🚀.

But there is also another type of queue along with Event Queue Microtask queue / Priority queue.

[Rishu srivastava](https://hashnode.com/@rishuk524)

[Sep 13, 2022](https://hashnode.com/posts/javascript-event-loop/631f45156c86d75accc7e028/comment/63201c7f526d775aa7f6789e)

Amazing

[Manuel Serafin Bugarin](https://hashnode.com/@elser)

[Sep 13, 2022](https://hashnode.com/posts/javascript-event-loop/631f45156c86d75accc7e028/comment/631ff512526d775aa7f671f3)

Great explanation! Thank you for this!

[Chhakuli Zingare](https://hashnode.com/@chhakuli)

[Sep 13, 2022](https://hashnode.com/posts/javascript-event-loop/631f45156c86d75accc7e028/comment/631ff512526d775aa7f671f3#reply-631ff9e3526d775aa7f67287)

Really happy...😊stay tuned for more..

[Wojtek X](https://hashnode.com/@wojtekxtx)

[Sep 12, 2022](https://hashnode.com/posts/javascript-event-loop/631f45156c86d75accc7e028/comment/631f6d016c86d75accc7e95e)

Just awesome 😀 keep writing and learning ✌️

[Chhakuli Zingare](https://hashnode.com/@chhakuli)

[Sep 13, 2022](https://hashnode.com/posts/javascript-event-loop/631f45156c86d75accc7e028/comment/631f6d016c86d75accc7e95e#reply-631ff9f1526d775aa7f6728b)

Thank you😊

[Manik Dixit](https://hashnode.com/@manikdixit)

[Sep 12, 2022](https://hashnode.com/posts/javascript-event-loop/631f45156c86d75accc7e028/comment/631f6cb46c86d75accc7e932)

More power to u !!! 😊🔥🔥🔥

[Chhakuli Zingare](https://hashnode.com/@chhakuli)

[Sep 13, 2022](https://hashnode.com/posts/javascript-event-loop/631f45156c86d75accc7e028/comment/631f6cb46c86d75accc7e932#reply-631ffa3f6c86d75accc7fb04)

Thank you batchmate..🥰

[VINOD-KUMAR-M](https://hashnode.com/@VKECE12465)

[Sep 12, 2022](https://hashnode.com/posts/javascript-event-loop/631f45156c86d75accc7e028/comment/631f575d526d775aa7f65bcc)

You're nailed it down the event loops and the best explanation. While I'm reading your articles, those articles are directly transferred to my brain. keep write and never give up. You're text animations also awesome!

[Chhakuli Zingare](https://hashnode.com/@chhakuli)

[Sep 13, 2022](https://hashnode.com/posts/javascript-event-loop/631f45156c86d75accc7e028/comment/631f575d526d775aa7f65bcc#reply-631ffa806c86d75accc7fb0a)

ohhh my goodness..thank you so muchhhh🥰 Happy learning!

[Abhishek Sharma](https://hashnode.com/@abhishek7329)

[Sep 12, 2022](https://hashnode.com/posts/javascript-event-loop/631f45156c86d75accc7e028/comment/631f4e15526d775aa7f65857)

Awesome 😎

[Chhakuli Zingare](https://hashnode.com/@chhakuli)

[Sep 12, 2022](https://hashnode.com/posts/javascript-event-loop/631f45156c86d75accc7e028/comment/631f4e15526d775aa7f65857#reply-631f4ef4526d775aa7f658d5)

Thanks and keep reading 🥰🥰🥰
