Block scope - Block scoping means declaring a variable, not just inside a function, but around any curly brackets like if statements or loops.
Var outside of a function, it belongs to the global scope.
inside of a function, it belongs to that function.
inside of a block like loop etc, still avail outside the block
let it block scoped
const once it is created, it cant be changed. it is block scoped
it defines constant reference value
Because of this you can NOT:
👉Reassign a constant value
👉Reassign a constant array
👉Reassign a constant object
But you CAN:
👉Change the elements of constant array
👉Change the properties of constant object