Lexical Scope

Overview of lexical scope in JavaScript.

We'll cover the following...

Background

There are two types of scopes: global and local. We have yet to explore exactly how local scopes draw boundaries between themselves. Additionally, JavaScript has some features that allow inner scopes to access values from the outer scope.

Introduction

Lexical scope is the ability for a function scope to access variables from ...