Welcome to the JavaScript Output-Based Interview Prep repository!
This repository is a comprehensive collection of 134 carefully documented questions inspired by the BFE.dev JavaScript quiz series.
Each question focuses on predicting the output of tricky and often misunderstood JavaScript snippets – an essential skill for acing frontend interviews and mastering the language deeply.
This repo includes:
- ✅ 134 Output-based Questions from BFE.dev
- 📂 One
.md
file per question, named consistently for easy lookup (01_promise_order.md
,02_promise_executor.md
, etc.) - 📖 Each file includes:
- ✅ The original question
- ✅ Correct output
- ✅ Step-by-step explanation with internal implementation logic
- ✅ Gotchas and things to remember for interviews (e.g., coercion behavior, microtask/queue nuances, scope quirks)
This is more than just answers. This repo aims to:
- Teach how JavaScript really works under the hood.
- Help you master:
- Promises
- Closures
- Scope
- Coercion
- Event loop and Microtask queue
- Hoisting, async/await, and more
- Be your go-to interview revision guide.
Whether you're prepping for FAANG, startups, or leveling up your core JS knowledge, this repo is structured to save time and boost clarity.
- Clone or fork the repo
- Browse through each question file in order or jump to specific ones from the 📂 Question Index
- For each file:
- Read the problem
- Try solving it on your own
- Cross-check the output and explanation
- Note the gotchas to avoid in future
- Frontend Developers
- JavaScript Learners & Interviewees
- Anyone who wants to master real-world JS quirks
Each question is documented in a separate .md
file named as follows:
- 001 Promise Order
- 002 Promise Executor
- 003 Promise Then Callbacks
- 004 Promise Then Callbacks Ii
- 005 Scope
- 006 Arrow Function
- 007 Increment Operator
- 008 Implicit Coercion I
- 009 Null And Undefined
- 010 Equal
- 011 Implicit Coercion Ii
- 012 Arguments
- 013 Operator Precedence
- 014 Addition Vs Unary Plus
- 015 Instanceof
- 016 Parseint
- 017 Reduce
- 018 Promise Executor Ii
- 019 This
- 020 Name For Function Expression
- 021 Array I
- 022 Min Max
- 023 Promise All
- 024 Equality And Sameness
- 025 Zero
- 026 True Or False
- 027 Hoisting I
- 028 Hoisting Ii
- 029 Hoisting Iii
- 030 Equal Ii
- 031 Math
- 032 Hoisting Iiii
- 033 This Ii
- 034 Precedence
- 035 Implicit Coercion Iii
- 036 Promise Prototype Finally
- 037 Push Unshift
- 038 Hoisting Iv
- 039 Var
- 040 Regexp Prototype Test
- 041 This Iii
- 042 Hoisting V
- 043 Json Stringify
- 044 Function Call
- 045 Hoisting Vi
- 046 Implicit Coercion Iv
- 047 Promise Order Ii
- 048 Prototype
- 049 This Iv
- 050 Async Await
- 051 Method
- 052 Requestanimationframe
- 053 Prototype 2
- 054 Settimeout 0ms
- 055 Sparse Array
- 056 To Primitive
- 057 Non Writable
- 058 Inherit Getter Setter
- 059 Override Setter
- 060 Postmessage
- 061 Onclick
- 062 Messagechannel
- 063 In
- 064 Reference Type
- 065 Function Name
- 066 Comma
- 067 If
- 068 If Ii
- 069 Undefined
- 070 Function
- 071 Two Way Generator
- 072 Array Length
- 073 Window Name
- 074 Typed Array Length
- 075 Meaningless Calculation
- 076 Const
- 077 Parseint 2
- 078 Regexp
- 079 Equal Iii
- 080 Proxy I
- 081 Settimeout Ii
- 082 Proxy Ii
- 083 Plus Plus
- 084 Array Prototype Sort
- 085 String Raw
- 086 Settimeout Iii
- 087 Instanceof 2
- 088 Try Catch
- 089 Let
- 090 Array Keys
- 091 Largest Array Index
- 092 Nan
- 093 String
- 094 Emoji
- 095 Number Format
- 096 Comparison
- 097 This V
- 098 Promise Executor Iv
- 099 Closure
- 100 Var Vs Let
- 101 Equal Iv
- 102 Arrow Function Ii
- 103 Promise Order Iii
- 104 Inheritance
- 105 Typeof
- 106 Promise All Ii
- 107 This Vi
- 108 Property Key
- 109 Isnan
- 110 Yield
- 111 Falsy
- 112 Symbol
- 113 Push
- 114 Constructor
- 115 Parseint Ii
- 116 Strict
- 117 This Vii
- 118 Structuredclone
- 119 Return In Generator
- 120 Try Catch Finally
- 121 Generator Return
- 122 Iterable
- 123 Return In Generator 2
- 124 Comma 2
- 125 Try Catch Finally 2
- 126 Object Keys
- 127 Json Stringify Ii
- 128 Settimeout Iv
- 129 Function Ii
- 130 Async
- 131 Return Await
- 132 Banana
- 133 Tostring
- 134 Object Groupby
This project is licensed under the MIT License - see the LICENSE file for details.
We welcome contributions! Please see our Contributing Guidelines for details on how to:
- Add new questions
- Improve explanations
- Fix typos or errors
- Suggest better examples
If this repository helped you in your JavaScript interview prep, please give it a star! ⭐