Skip to content

Variables

Variables are the foundation of any program — they let you store, label, and manipulate data.

  • Declare variables using var, let, and const
  • Understand the difference between function-scoped and block-scoped variables
  • Explain hoisting and the Temporal Dead Zone (TDZ)
  • Choose the right declaration for every scenario
TopicDescriptionEst. Time
varFunction-scoped, hoisting, redeclaration15 min
letBlock-scoped, no redeclaration, TDZ15 min
constImmutable binding, objects & arrays15 min
Temporal Dead ZoneWhat is TDZ and why it exists10 min
Variable HoistingHow hoisting works for each declaration10 min
var → let → const → temporal-dead-zone → variable-hoisting

⏱ Total Time: ~1.5 hours Previous: Environment Next: Data Types