What is the relationship between event loop and Promise [duplicate]
Each event loop has a microtask queue and a macrotask queue. A microtask is a task that is originally to be queued on the microtask queue rather than a task queue. Refer to https://www.w3.org/TR/html51/webappapis.html#microtask-queue. There are two kinds of microtasks: solitary callback microtasks, such as Promise, and compound microtasks, such as Object.observe, MutationObserver and process.nextTick … Read more