JavaScript Variables Lifecycle: Why let Is Not Hoisted

Hoisting moves variables and functions to the beginning of the scope. But this term is no longer valid for let, const and class: and here’s why.

Of course a practiced JavaScript developer won’t code this way. But in the thousands of JavaScript GitHub repos is quite possible to deal with such code.

#javascript #variable #hoisting

JavaScript Variables Lifecycle: Why let Is Not Hoisted
1.70 GEEK