Difference between var, let and const in JS
What are the differences between var, let and const in JS?
A let variable is block scoped and can be re-assigned.
A const is block scoped and its reference can’t be re-assigned.
A var can be locally or globally scoped, re-assigned and hoisted.