Temporal Dead Zone

Noun · Development

Definitions

  1. The region in a JavaScript scope between the start of the block and the point where a let or const variable is declared, during which any reference to that variable throws a ReferenceError — unlike var, which is hoisted and initialized to undefined.

    In plain English: A zone in JavaScript code where a variable technically exists but cannot be used yet because its declaration has not been reached.

    Example: "You're hitting a ReferenceError because you're accessing the variable in the temporal dead zone — move the let declaration above the usage."

Related Terms