JSPrep Pro › JavaScript Output Questions ⚡ Predict the Output
JavaScript Output QuestionsWhat Does This Code Print? 66+ real JavaScript output prediction questions from frontend interviews. Read code → predict console.log → learn why.
✅ 66 questions · ✅ First 5 interactive free · ✅ Progress saved in quiz
⚡ How to use this page Try the first 5 questions here — click a question, type your prediction, check it. No account needed. The rest are in the interactive quiz where progress is tracked. Reading answers ≠ predicting them.
📋 Topics ⚙️ Event Loop & Promises 16 questions
#01 Classic setTimeout vs Promise
🟡 Medium Event Loop & Promises event-loop microtask
▾ #02 Nested setTimeout and Promise
🔴 Hard Event Loop & Promises event-loop microtask
▾ #03 async/await execution order
🟡 Medium Event Loop & Promises async-await microtask
▾ #04 🔴 Hard Event Loop & Promises promise then-chain
▾ #05 Promise constructor is synchronous
🟡 Medium Event Loop & Promises promise constructor
▾ #06 async/await vs .then chain
🔴 Hard Event Loop & Promises async-await promise
▾ #07 🔴 Hard Event Loop & Promises async-await microtask
▾ #08 queueMicrotask vs Promise
🔴 Hard Event Loop & Promises microtask queueMicrotask
▾ #09 🟡 Medium Event Loop & Promises promise-all order
▾ #10 Generator execution order
🟡 Medium Event Loop & Promises generator yield
▾ #11 Generator two-way communication
🔴 Hard Event Loop & Promises generator yield
▾ #12 requestAnimationFrame vs setTimeout order
🔴 Hard Event Loop & Promises requestAnimationFrame settimeout
▾ #13 async/await with rejection
🔴 Hard Event Loop & Promises async await
▾ #14 Custom iterable with for...of
🟡 Medium Event Loop & Promises iterable symbol-iterator
▾ #15 Promise rejection in async generator
🔴 Hard Event Loop & Promises async-generator for-await
▾ #16 Promise.all vs sequential await performance
🔴 Hard Event Loop & Promises promise-all sequential
▾ 🔒 Closures & Scope 19 questions
#17 Classic var in loop closure
🟢 Easy Closures & Scope closure var
▾ #18 let in loop closure (fix)
🟢 Easy Closures & Scope closure let
▾ #19 🟡 Medium Closures & Scope closure counter
▾ #20 🟡 Medium Closures & Scope closure iife
▾ #21 🔴 Hard Closures & Scope closure scope-chain
▾ #22 🔴 Hard Closures & Scope closure shared-reference
▾ #23 🟡 Medium Closures & Scope block-scope let
▾ #24 Module pattern with closure
🔴 Hard Closures & Scope closure module
▾ #25 🟡 Medium Closures & Scope scope scope-chain
▾ #26 Block scope vs function scope
🟡 Medium Closures & Scope let var
▾ #27 Temporal Dead Zone with let
🔴 Hard Closures & Scope tdz let
▾ #28 Closure in object methods
🟡 Medium Closures & Scope closure object
▾ #29 Map key reference equality
🟡 Medium Closures & Scope map reference
▾ #30 🟡 Medium Closures & Scope set unique
▾ #31 Nested object destructuring with defaults
🟡 Medium Closures & Scope destructuring defaults
▾ #32 Spread vs rest in different positions
🔴 Hard Closures & Scope spread rest
▾ #33 Object spread override order
🟡 Medium Closures & Scope spread object
▾ #34 Module pattern with revealed state
🟡 Medium Closures & Scope module-pattern iife
▾ #35 WeakMap with garbage collectible keys
🔴 Hard Closures & Scope weakmap gc
▾ 👉 'this' Binding 11 questions
#36 Method extracted from object
🟡 Medium 'this' Binding this method
▾ #37 🟡 Medium 'this' Binding this arrow-function
▾ #38 🔴 Hard 'this' Binding this nested
▾ #39 bind creates new function
🔴 Hard 'this' Binding this bind
▾ #40 🟡 Medium 'this' Binding this settimeout
▾ #41 🔴 Hard 'this' Binding this class
▾ #42 🔴 Hard 'this' Binding this call
▾ #43 new binding creates fresh object
🟡 Medium 'this' Binding this new
▾ #44 Chained method calls and this
🔴 Hard 'this' Binding this method-chaining
▾ #45 Proxy get trap intercepts access
🔴 Hard 'this' Binding proxy get-trap
▾ #46 Prototype chain property lookup
🔴 Hard 'this' Binding prototype chain
▾ #47 🟢 Easy Hoisting hoisting var
▾ #48 Function declaration hoisting
🟢 Easy Hoisting hoisting function-declaration
▾ #49 Function expression not hoisted
🟡 Medium Hoisting hoisting function-expression
▾ #50 🟡 Medium Hoisting hoisting let
▾ #51 Function vs var hoisting order
🔴 Hard Hoisting hoisting function
▾ #52 🔴 Hard Hoisting hoisting block
▾ #53 Class declaration hoisting (TDZ)
🔴 Hard Hoisting hoisting class
▾ #54 Hoisting with default exports and imports
🟡 Medium Hoisting esmodules hoisting
▾ 🔀 Type Coercion 12 questions
#55 🟢 Easy Type Coercion coercion equality
▾ #56 Addition vs concatenation
🟡 Medium Type Coercion coercion addition
▾ #57 🟡 Medium Type Coercion coercion falsy
▾ #58 🟡 Medium Type Coercion coercion nan
▾ #59 Object to primitive coercion
🔴 Hard Type Coercion coercion object
▾ #60 🔴 Hard Type Coercion coercion unary
▾ #61 🟡 Medium Type Coercion coercion comparison
▾ #62 🔴 Hard Type Coercion coercion array
▾ #63 🔴 Hard Type Coercion symbol coercion
▾ #64 Default parameter coercion
🟡 Medium Type Coercion default-params undefined
▾ #65 Symbol.toPrimitive custom coercion
🔴 Hard Type Coercion symbol-toprimitive coercion
▾ #66 Optional chaining with nullish coalescing
🟡 Medium Type Coercion optional-chaining nullish-coalescing
▾ 🔒
61 more questions with progress tracking Free accounts get 5 tracked questions. Pro unlocks all 66+ output questions, debug lab, theory mastery, and the leaderboard.
© 2026 JSPrep Pro · https://jsprep.pro