Skip to content

Latest commit

 

History

History
8 lines (6 loc) · 618 Bytes

File metadata and controls

8 lines (6 loc) · 618 Bytes
title subtitle
What is event loop?
What is the difference between call stack and task queue?

The event loop is a single-threaded loop that monitors the call stack and checks if there is any work to be done in the task queue. If the call stack is empty and there are callback functions in the task queue, a function is dequeued and pushed onto the call stack to be executed.

If you haven't already checked out Philip Robert's talk on the Event Loop, you should. It is one of the most viewed videos on JavaScript.