uninitialized variable

JSvariable ⟩ uninitialized variable

when a let / const / class is still in its temporal dead zone, it is said to be uninitialized.

TDZ vs. uninitialized variable

  • TDZ refers to the time window (time period) where a const/let variable exists but is still uninitialized (and cannot be accessed in any way).

  • uninitialized variable refers to the const/let variable itself.

they are two sides of the same coin.

Last updated