🧒 Explain like I'm 5
Imagine a chef (JS has only one chef). He finishes all the tasks on the table (synchronous code) before turning to the two lines of waiting customers. The VIP line (microtask — Promise) is served completely first. After that, he calls one person from the regular line (macrotask — setTimeout), serves them, then returns to clean up the VIP line before calling the next person from the regular line.
Interactive quiz
Check your understanding with an instant-feedback quick check.
Detailed notes
Senior-level deep dive: internals, pitfalls, and a self-interview ladder.
Practice with AI feedback
Answer out loud, get scored on correctness, depth, and clarity.