✦
JAVASCRIPT
What is the difference between var, let, and const in JavaScript?
'var' is function-scoped (or globally scoped), allows re-declaration, and is hoisted with an initial value of undefined. 'let' and 'const' are block-scoped, cannot be re-declared in the same scope, and are hoisted into a Temporal Dead Zone (TDZ) where accessing them before initialization throws a ReferenceError. 'const' also prevents reassignment of the variable binding (though object properties remain mutable).
CompanyGoogle◦ Variables & Scope
