# Scope: Where a Variable Can Be Seen

Scope is the part of a program where a variable can be seen and used, and knowing its three kinds (global, function and block) explains a whole family of "is not defined" errors and values that won't change.

![Cheat sheet: Scope: Where a Variable Can Be Seen](https://fsdtrainingmedia.blob.core.windows.net/public/images/2026/10/5c5a417a542647d787ccb652f3192cdd.webp)

- Category: JavaScript
- Level: Apprentice
- Tags: Block Scope, Global Scope, JavaScript, Local Scope, Scope (javascript), Scope Chain, Shadowing (javascript)
- Updated: November 1, 2026

Source: https://www.ask-codey.com/cheat-sheets/javascript-scope-where-variables-live-cheat-sheet
