JavaScript runs on a single thread, so it can only do one thing at a time. The event loop is what lets it handle async work without blocking: it runs the call stack, and when the stack is empty, it pulls callbacks from queues.
There are two queues with different priorities:
