Skip to content
JavaScript·Intermediate·Conceptual·1 min read

Do closures capture objects by reference and primitives by value?

Short interview answer

That wording is misleading. Closures reference lexical bindings. A binding may currently contain a primitive or an object reference, and reassignment changes what later reads observe.

Key takeaway

Explain the underlying mental model clearly, then support it with a concrete example and its trade-offs.

← Back to Closures

Related questions