Blog
Mert Özen's blog posts on software development, backend, frontend, and DevOps.
Series
Frontend
PART 03
JavaScript Scope, Hoisting and Closures: Where Do Variables Live?
We learn global, function and block scope, the scope chain, how var, let, const and functions are hoisted, the TDZ, and closures through counters, private data and function factories, plus the closure-in-a-loop trap.
3 Nov 2026
9 min
4
Frontend
PART 03
JavaScript Variables: let and const, Block Scope and the TDZ
We declare variables with let and const, and use examples to see reassignment versus mutation, block scope, naming rules, why var has been retired, and the TDZ.
3 Nov 2026
9 min
5