How It Runs

See how JavaScript actually runs.

Predict the output. Watch every step. Finally understand why.

interview.jsrunning
1console.log('A');
3setTimeout(() => console.log('B'), 0);
5Promise.resolve().then(() => console.log('C'));
7console.log('D');
Microtask Queue0
empty
Task Queue0
empty
Console
>A
>
>
>
Sync code runs first

No signup. No setup. ~8 minutes per case.

01

Predict

Commit to an output before you see anything. That is where learning starts.

02

Watch

Step through the engine: Call Stack, Web APIs, both queues, the console.

03

Understand

A few rules explain the whole thing — right after you watched them work.

04

Experiment

One line changes. Predict again. Does your model survive?

The series

Real snippets developers get wrong — with the exact misconception named when you do.