Skip to Content
JavaScript Advanced: Code That Holds Up in Production
Advanced
0 likes
Courses
JavaScript Advanced: Code That Holds Up in Production

Check Yourself: How JavaScript Actually Runs

Five scenario questions on the event loop, parallel promises and cancelling. If you miss more than one, predict the output of the examples before you run them.

Course content

Sign in to save your progress.

Course Home
1. console.log("A"); setTimeout(() => console.log("B"), 0); Promise.resolve().then(() => console.log("C")); console.log("D"); What prints?
2. A click handler runs a loop that takes 2 seconds. A setTimeout(fn, 0) was scheduled just before it. When does fn run?
3. A dashboard loads 9 independent widgets. If one fails, the other 8 should still show. Which do you use?
5. A user types quickly in a search box, and old results sometimes replace new ones. What's the best fix?

About

Five scenario questions on the event loop, parallel promises and cancelling. If you miss more than one, predict the output of the examples before you run them.

Duration
5 min
Last update
08/15/2026
Was this helpful?
​ 0 ​ 0

Comments (0)

Sign in to comment

No comments yet.