The let
keyword was introduced in ES6 (2015)
Variables declared with let
have Block Scope
Variables declared with let
must be Declared before use
Variables declared with let
cannot be Redeclared in the same scope
Block Scope
Before ES6 (2015), JavaScript did not have Block Scope.
JavaScript had Global Scope and Function Scope.
ES6 introduced the two new JavaScript keywords: let
and const
. Continue reading JavaScript Let