What is Hoisting?
Hoisting moves declarations to the top of their scope during compilation.
Only declarations are hoisted, not assignments, which explains many surprises.
Modern JavaScript uses let/const and TDZ to make hoisting safer and more predictable.