Tags

Closures

Closures

0 lessons
6 question banks
3 community items

closures

Question Banks

6 items
Question Bank

JavaScript Language Trivia

Beginner JS quirks to predict and explain: `==` vs `===`, hoisting, `this` binding in different call sites, and one quick closure trace.

JavaScript
js-hoisting
js-this
closures
quiz

1.1k

23

Easy
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.

JavaScript
quiz
interview-prep
closures
js-lexical-scope

1.1k

11

Medium
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.

JavaScript
quiz
closures
js-lexical-scope
interview-prep

417

12

Medium
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.

JavaScript
quiz
closures
js-lexical-scope
interview-prep

354

11

Medium
Question Bank

JavaScript Inherit x From Function b: Two Approaches Quiz

Make constructor `b` inherit `x` from constructor `a`: parent-constructor call via `Function.prototype.call`, ES6 `extends` + `super`, `Object.create` chaining, and an arrow-vs-constructor explainer.

JavaScript
quiz
closures
inheritance
interview-prep

705

4

Medium
Question Bank

JavaScript Add-N via Currying: Two Approaches Quiz

Two seeded ways to build an `adder(n)` that adds `n` to its argument (closure-returning-function and `Function.prototype.bind`), plus two companions on three-arg currying and a generic curry helper.

JavaScript
quiz
currying
closures
higher-order-functions

629

16

Medium