Skip to content
RED SAG Skills
medium10 pts · first answer countsjavascriptevent-loop

setTimeout vs microtasks

What is the order of the logs?

setTimeout(() => console.log('timeout'), 0)
queueMicrotask(() => console.log('micro'))
Promise.resolve().then(() => console.log('then'))
console.log('sync')
Choose one answer

Discussion 0

Join free to post in the discussion.

Related questions