Project 23: Weather Widget
JS Wizard
Builds on these lessons
Step 1 of 2
Project
Call Stack vs. the Queue
Log "A", schedule a setTimeout logging "B" with 0ms delay, then log "C". The output is A, C, B — even a 0ms setTimeout still waits for the current call stack to fully empty before its callback runs, because it goes through the event loop's task queue, not straight onto the stack.
🎯 Your Task
Please add the exact code shown in the light gray box below to your editor.Do not delete your previous code, just insert these new lines in the correct place!
console.log("A");
setTimeout(() => {
console.log("B");
}, 0);
console.log("C");