DEV Community

Discussion on: Introduction to Hoisting in JavaScript.

Collapse
 
uddeshjain profile image
Uddesh

using const and let will throw ReferenceError because you have to initialize the variable at the time of declaration if you wanna use const or let. It's not officially mentioned in ECMAScript documentation but it will definitely throw the error.