Dev.to
8/4/2026

The original title is: "JavaScript Interview Questions Every Dev Should Know — Part 2: Functions, Scope & Closures"
Original: JavaScript Interview Questions Every Dev Should Know — Part 2: Functions, Scope & Closures
Short summary
Part 2 of a JavaScript interview series covering functions, scope, and closures. Closures are explained as inner functions retaining access to outer scope variables via live references, enabling data privacy, factory functions, and memoization. The article also covers lexical scoping, hoisting differences between declarations and expressions, and arrow function this-binding behavior.
- •Closures capture live references to outer variables, not just values
- •Lexical scoping determines variable accessibility by code structure, not call order
- •Arrow functions lack their own this — they use the surrounding lexical scope's value
Generated with AI, which can make mistakes.
Is this a good recommendation for you?



