JavaScript throws a ReferenceError.
The scope chain is the sequence of scopes JavaScript searches when resolving variables.
Yes. Closures use the scope chain to access variables from outer scopes.
Yes. JavaScript moves up the scope chain until it finds the variable or reaches the global scope.
Browse all our FAQs or reach out to our support team
Your learning library
Find your next course. Build something great.
LEARN. BUILD. GROW.