Pages

July 13, 2019

What is the Difference between var and let in JavaScript?

var keyword
Variables declared with the var keyword can not have Block Scope.
Variables declared inside a block {} can be accessed from outside the block.
Variables can be referred to before the declaration.