letkeyword will work almost the same as
varbut they will not be hoisted, so the following will NOT work.
Uncaught ReferenceError: Cannot access 'y' before initialization
constare called "constants" and just like those declared with
let, they are NOT hoisted. They also have another behaviour, which is that they cannot be reassigned. Once the variable has been declared, the value stored inside it cannot be replaced. Again, this might seem like odd restrictive behaviour, but it is also often desired - more often than not.