Node.js interview warm-up

Event loop, closures, async concurrency and the Node.js practicals interviewers love.

  1. var in a Loop with setTimeout Why every callback sees the same `i`. Easy Most asked Node.js
  2. Microtasks vs Macrotasks Order of sync code, promise callbacks, await continuations and timers. Medium Most asked Node.js
  3. Type Coercion Surprises `+` vs `-` with strings, loose equality and typeof quirks. Medium Node.js
  4. Implement debounce() Delay a function until calls stop for `wait` ms; support cancel() and keep `this`. Medium Most asked Node.js
  5. Run Async Tasks with a Concurrency Limit Map over items with at most `limit` promises in flight, keeping result order. Medium Most asked Node.js
  6. Build an EventEmitter Implement on, off, once and emit like Node's EventEmitter. Medium Node.js
  7. Two Sum Find the indices of the two numbers that add up to a target. Easy Most asked All 5 languages
  8. LRU Cache A fixed-capacity cache that evicts the least recently used key, with O(1) get and put. Medium Most asked All 5 languages
  9. Retry with Exponential Backoff Retry a failing operation with exponential delays, but never retry non-retryable errors. Medium Most asked All 5 languages

← All coding problems