The Temporal Dead Zone (TDZ) is the time between: When a let or const variable is hoisted, and When it is actually declared/initialized in code. During this time, the variable exists in memory (because of hoisting), but you can’t access it — doing so throws a ReferenceError.

The Temporal Dead Zone (TDZ) is the time between:
- When a
let
orconst
variable is hoisted, and - When it is actually declared/initialized in code.
During this time, the variable exists in memory (because of hoisting), but you can’t access it — doing so throws a ReferenceError
.