Lexical Scope
0 lessons
3 question banks
1 community item
js-lexical-scope
Question Banks
3 items
Question Bank
JavaScript Scope and Closure Code Traces
Six traces covering the `var` loop-closure pitfall, parameter shadowing, IIFE captures, block scope leaks, and `delete` on locals.
Question Bank
JavaScript Closures and Private State Quiz
Build the classic closure patterns: encapsulated counters, lexical-scope inheritance through nested functions, and constructor-level private fields.
Question Bank
JavaScript var Loop Closure: Two Explanations Quiz
The classic var-in-a-for-loop closure trap, explained two ways (shared `i` binding and the IIFE capture fix), plus two companions on the `let` per-iteration binding and a queueMicrotask version of the trap.
