JavaScript Event Loop
Both web browser & Node have an event loop. Node’s event loop is built on libuv. Web browser’s event loop is built on a different library.
1) Below are 2 videos explaining Browser event loop (relationship between the call stack, event loop, task queue, and then “outside” threads like web apis) :
What the heck is the event loop anyway? | Philip Roberts
https://www.youtube.com/watch?v=8aGhZQkoFbQ
Arindam Paul – JavaScript VM internals, EventLoop, Async and ScopeChains
https://www.youtube.com/watch?v=QyUFheng6J0
2 ) Below are 2 videos about Node.js Event Loop:
Node’s Event Loop From the Inside Out by Sam Roberts, IBM
https://www.youtube.com/watch?v=P9csgxBgaZ8&t=410s
Morning Keynote- Everything You Need to Know About Node.js Event Loop – Bert Belder, IBM
https://www.youtube.com/watch?v=PNa9OMajw9w&t=9s