Event loop is the mechanism to keeping track of event queue and callback in order to handle callbacks asynchronously.

Since javascript is single thread, processes which take long time are crucial for execution of the program.

Here is some examples when event loop works.

  • Event handler
  • Promise
  • XMLHttpRequest

https://www.youtube.com/watch?v=EQL9r8UlrPA

https://www.youtube.com/watch?v=zphcsoSJMvM

https://www.youtube.com/watch?v=6MXRNXXgP_0

results matching ""

    No results matching ""