Sphere
Log in Join
☆ 3

Interview: I froze when asked how the JavaScript event loop works

I have three years of experience but could not explain microtasks in an interview. I knew the behavior but not the words. How do people prepare for this?

⚑ Report

3 replies

☆ 0
C Clara ·2026-11-10#1

Explain it in your own words first: call stack, task queue, microtask queue. Then learn the names. Interviewers care more about reasoning than vocabulary.

⚑ Report
☆ 0
F Felix ·2026-11-10#2

I could describe what happens but not why microtasks run first.

⚑ Report
☆ 0
E Elise ·2026-11-10#3

Say that honestly and walk through a concrete example with setTimeout and a promise. Being able to reason out loud is worth more than memorised definitions.

⚑ Report
Log in to reply.