SpinTheMic
Pro

Explain it in 60 seconds

Microtasks vs macrotasks

Frontend Engineering · Async JavaScript and the Browser · Beginner

What is the difference between microtasks and macrotasks (tasks)?

What a strong answer covers

Your AI report card counts how many of these ideas you cover.

  • Tasks: setTimeout, events, I/O callbacks.
  • Microtasks: promise callbacks, queueMicrotask.
  • All microtasks run before next task.
  • Promise callbacks run before setTimeout(0).
  • Endless microtasks can block rendering.
Practise this topic

Start without signing up. Sign in free to get an AI report card on your answer.

See all topics