# Scope in JavaScript

Scope in JavaScript: Scope: Where a Variable Can Be Seen, Hoisting, var and the Temporal Dead Zone.

Updated: November 14, 2026

1. [Scope: Where a Variable Can Be Seen](https://www.ask-codey.com/lessons/javascript-scope-where-variables-live) (Apprentice): 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.
2. [Hoisting, var and the Temporal Dead Zone](https://www.ask-codey.com/lessons/javascript-scope-hoisting-and-var) (Journeyman): Before JavaScript runs a scope it notes every declaration in it, which is why a function can be called above the line that makes it, why var gives undefined there, and why let and const stop with an error instead.

Source: https://www.ask-codey.com/courses/javascript-in-depth/topics/javascript-scope
