1.What is the difference between var, let and const?
Show hint
Scope, hoisting and reassignment.
Show solution
var is function-scoped and hoisted as undefined. let and const are block-scoped and throw a ReferenceError if used before their declaration (the temporal dead zone). const cannot be reassigned, though objects it holds can still be modified. Use const by default, let when the value changes.