Variable declaration in JS
- let
- It has a block-scope
- const
- Used for unchanging variable
- This can’t be re-defined
- var
- No block-scope
- var variables are either function-wide or global
- they are visible through blocks.
- let and const basically replace var.
var should not be used anymore