I'm investigating the event loop. But I ran into a question. What works before on eventloop? Microtasks or macrotasks? if I run the following code
Promise.resolve().then(()=> console.log('Promise'));
setTimeOut(()=>console.log("setTimeout"),0);
console.log show "Promise setTimeout"; but according to an answer Difference between microtask and macrotask within an event loop context Macrotasks works before microtask.