JavaScript bank Engine Internals JavaScript / 25 questions Your progress 0 / 25 done Saved in this browser. Reset All 25 Easy 2 Medium 12 Hard 11 Hide done No questions match those filters. 01 Explain the Global Execution Context vs Function Execution Context. Medium 02 What are the two phases of execution context creation (memory creation and code execution)? Hard 03 Explain the Lexical Environment and Environment Record and how they relate to closures. Hard 04 How does the JS engine manage the execution context stack when a function calls another function? Medium 05 Trace the execution context stack for a small recursive function computing factorial(3). Medium 06 Explain the difference between the Variable Environment and Lexical Environment inside an execution context. Hard 07 How does `this` binding get determined during execution context creation? Medium 08 What is the call stack and how does it grow/shrink as functions call each other? Easy 09 Explain 'Maximum call stack size exceeded' and demonstrate how unbounded recursion triggers it. Medium 10 What is tail call optimization? Why isn't it broadly implemented across JS engines despite being in the spec? Hard 11 Rewrite a recursive factorial function to be tail-call friendly and discuss real-world engine support. Hard 12 How does async/await interact with the call stack differently from synchronous recursive calls? Hard 13 Explain how a stack trace helps you debug deep call chains in DevTools. Easy 14 Explain the JavaScript memory lifecycle: allocation, use, and release. Medium 15 What are the four common causes of memory leaks in frontend JavaScript applications? Medium 16 How do detached DOM nodes cause memory leaks, and how would you detect them using Chrome DevTools heap snapshots? Hard 17 Explain how closures can unintentionally retain large objects in memory. Medium 18 What is the difference between the stack and the heap for memory allocation in JS? Medium 19 How do global variables and forgotten timers/intervals contribute to memory leaks in single-page apps? Medium 20 Explain WeakRef and FinalizationRegistry — what problems do they solve, and why should they be used cautiously? Hard 21 Explain the mark-and-sweep algorithm used by JS engines for garbage collection. Medium 22 What is reference counting garbage collection and why does it fail with circular references? Medium 23 Explain V8's generational garbage collection (young generation / old generation, Scavenger, Mark-Compact). Hard 24 How does garbage collection affect JS performance, and what strategies help minimize GC pauses in hot code paths? Hard 25 Explain why object pooling can help reduce garbage collection pressure in performance-critical applications (e.g., games, canvas rendering). Hard ← Previous Functions Next → Async & Concurrency