I have understood the generals of this for quite a while, but could not explain it. Now I better can!
I wonder if this is why you cannot use a while loop to block the thread while waiting for an asynchronous task to be completed. The browser delegates that task to another thread, and when that promise is resolved, it will place the response/callback in the event queue. However, if a while loop is ongoing (like while (true)) then it will keep iterating forever, placing its iterations into the call stack continuously.
Thus, the call stack will never be empty for the promise in the event loop to reach the call stack and proceed with the code.
Is my thought process correct here?