--

Hi, thanks for your comment

That's why it's a tricky question, you should check out my previous article that discussed about macrotask and microtask here
https://andreassujono.medium.com/tricky-event-loop-macrotask-and-microtask-question-506956b0a26d


In this scenario, promise is a microtask that when it is runned, it will push a new macrotask which is console.log(2)

--

--

Andreas Sujono
Andreas Sujono

Written by Andreas Sujono

A Full Stack Developer with 5 years of working experience, Web2 and Web3 Enthusiast, twitter: @AndreasSujono2

No responses yet