“let and const are not hoisted” — why?
Dmitriy Nadrshin
221

let and const are commonly considered as not hoisted due to their different behavior.
In reality, all declarations are hoisted in JavaScript. The fact is that let and const differ in their initialization.
var and function are initialized as undefined whereas let and const stay uninitialized (Temporal Dead Zone) until its statement is evaluated. That’s why a you get a ReferenceError when trying to access it before they are declared.

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.