Hoisting, var and the Temporal Dead Zone

Before JavaScript runs a scope it notes every declaration in it, which is why a function can be called above the line that makes it, why var gives undefined there, and why let and const stop with an error instead.

Updated

Cheat sheet: Hoisting, var and the Temporal Dead Zone
Category
JavaScript
Level
Journeyman
Tags
const (javascript), Function Declaration, Hoisting, JavaScript, let (javascript), Temporal Dead Zone, var (javascript)