LEARN. PRACTICE. EXPLAIN.
Learning paths & interview practiceP
Frontend Engineer
JavaScriptFoundation5 min

The timer says zero. It still runs last.

  1. 1Your approach
  2. 2The follow-up
  3. 3Reflect & learn
THE INTERVIEWER ASKS

The scenario

Predict the log order: console.log("A"); setTimeout(() => console.log("B"), 0); Promise.resolve().then(() => console.log("C")); console.log("D"). Explain why.

How would you approach it?

Explain your assumptions, your approach, and why you chose it.

Loading your notes…0 / 12,000
No timer. Think it through.
AlifBay Prep