Var
Var creates a variable that is function-scoped and can be reassigned at any time. If a var variable is declared outside of a function, it is part of the global scope and will be a property on the global object.
Example
Let
A variable declared with let can be reassigned at any time. let is block scoped, which means it is only available within the function.
Example
const
const is used for constant values. Hence, they cannot be reassigned. They are block scoped, just like let.
Example