JavaScript

Temporal Dead Zone

Definition

The period between entering a scope and the point where a `let` or `const` variable is declared. Accessing the variable during this period throws a ReferenceError. This prevents bugs caused by using variables before they are initialized.

Code Example

Javascript
Tip: Modify the code above and click “Run” to see the results

Learn More

Related Terms