What is the Temporal Dead Zone (TDZ)?
The Temporal Dead Zone refers to the zone in which a variable has been declared but has not yet been initialized. You can identify the Temporal Dead Zone by looking at code examples with comments labeled //Temporal Dead Zone
, as shown in the pictures below. But Different types of variables in a true javascript way, we face different behaviors
let Behavior Inside TDZ (console.log is also within the TDZ)
const Behavior Inside TDZ (console.log is also within the TDZ)
var Behavior Inside TDZ (console.log is also within the TDZ)
More info about TemporalDeadZone Here
Top comments (0)