❗var has no block scope❗️
Last updated
Was this helpful?
Last updated
Was this helpful?
Was this helpful?
JS ⟩ variable ⟩ var ⟩ has no block scope
var in block doesn't have block scope, cannot shadow let variable in the outer enclosing scope.
var hoisting - var is hoisted to top of enclosing function scope.
- doesn't allow .