Learn › JS Output Questions

🔮 JS Output Questions

72 predict-the-output questions — the category that trips up even experienced JS devs in real interviews.

Goal
Predict the output of any hoisting, closure, async, coercion, or prototype question without running it.
01
Output Questions: Hoisting & Scope
Predict the output — var/let/const hoisting, TDZ, function declaration vs expression, and block scope gotchas.
medium ⏱ 25m
02
Output Questions: Closures & Loops
Predict the output — closure capture, stale closures, IIFE patterns, loop bugs, and memoization gotchas.
medium ⏱ 25m
03
Output Questions: Event Loop & Async
Predict execution order — setTimeout vs Promise vs queueMicrotask, async/await unwrapping, and nested async patterns.
hard ⏱ 30m
04
Output Questions: this & Prototype Chain
Predict the output — implicit/explicit/new binding, arrow functions, prototype lookup, class inheritance, and the classic this-loss traps.
hard ⏱ 28m
05
Output Questions: Coercion, Operators & Equality
Predict the output — type coercion puzzles, == vs ===, + operator surprises, typeof edge cases, and bitwise/logical traps.
hard ⏱ 25m
06
Output Questions: Mixed & Advanced
Predict the output — generators, class edge cases, Array methods, Object tricks, Symbol, and multi-concept combinations.
hard ⏱ 30m