DEV Community

Discussion on: 70 JavaScript Interview Questions

Collapse
 
prashan81992916 profile image
prashanth • Edited

Hoisting

let and const are hoisted in a different scope but they are in the temporal dead zone. That's why they throw the error 'let variable cannot be accessed before declaration'