The var keyword is called function-scoped while let is block-scoped variables.
When JavaScript reads your variable declarations that uses the var are lifted to the top of local scope (if declared inside a function). Otherwise lifted to the top of the global scope (if declared outside a function).
Lastly, let are accessible inside the block to where it was defined.


