This is the third article in a series on how JavaScript actually runs. You can read the full series here or on my website.




In the last article, we established that:


JavaScript execution cannot be interrupted.


Once a macrotask starts, nothing cuts in. Only after it completes does the runtime select the next macrotask from the queue.

But...