var
A var variable can be re-declared and updated. var is “function scoped”.
The scope of a variable defined with “var” is limited to that “function”. If it is defined outside any function, then the scope of the variable is global.
let
A let variable be be updated but not re-declared. “let” is “block scoped”.
The scope of a variable defined with “let” is limited to the “block” which is defined by curly braces -> {}
const
As per the name suggests, const variables cannot be updated.
We can not re-assign value to the variable but it CAN be mutated.
Same as "Let", The scope of a variable defined with “let” is limited to the “block” which is defined by curly braces -> {
const difference let var variables