All courses
Course ยท Premium
How the Browser Runs and Renders Your Code
The event loop and rendering, one step at a time. Predict any output order, and fix a page that freezes.
10
Lessons
101
Steps
About 1.5 hours
Duration
Your own
Pace
Short on time? Read the recap and interview answers
Curriculum
- 01One thread, one call stackPremiumWhat runs your code, and what happens while it's busy.
- 02Macrotasks: how waiting works without blockingPremiumThe clicks during the freeze weren't lost. Where did they wait?
- 03Microtasks: the queue that goes firstPremiumA promise queued after the autosave ran before it. Why?
- 04Promises and await on the event loopPremiumTwo chains at once, then await: which line runs when?
- 05What happens in a framePremium"Running tests..." never shows. Why?
- 06requestAnimationFrame, and timing your updatesPremiumThe progress bar stutters. Timer or requestAnimationFrame?
- 07Layout, paint, composite: what each change costsPremiumCan a spinner keep spinning while the tests block?
- 08Layout thrashingPremiumAdding "Show more" to 500 results takes over 200 ms. Why?
- 09Long tasks and yieldingPremiumThe question search lags on every key. Why?
- 10Debugging slow interactions (INP)PremiumUsers say Run "feels slow". Where do you start?
- FinalThe output challengePremiumTwelve questions from across the course. Pass it to claim your certificate.



