DeepFrontend
Learning Paths
Practice
System Design & DS
Design Studio
Data Structures Curriculum
Real-World Case Studies
Careers
Job Board
Resume Builder
Blog
Sign in
Search
⌘K
Go Pro
Loading compiler resources...
Frontend Performance Quiz Practice
Active Recall Drill Session
← Exit Session
Question 1 of 1
hard
Frontend Performance
Why does the topic recommend scoping large data OUT of long-lived closures when only a derived value is needed later?
A
It has no real benefit, just a style preference
B
Because a closure captures its entire enclosing scope — deliberately extracting only the needed derived value in a separate call BEFORE closure creation prevents the large source data from being unnecessarily retained
C
This technique only works for functions, not closures
D
Large data can never be used inside a closure at all
Check Answer