DEV Community

Discussion on: Everything is 'undefined' in JavaScript

Collapse
 
kanhasonu21 profile image
Kanhaiya Kumar

let and const are also hoisted in javascript. If you go deep inside browser you'll see another memory allocation called "Scripts" where these let and const are hoisted.Till the time you didn't put value in let it resides in "Temporal Dead Zone" .
Below link will help more to explain.
stackoverflow.com/questions/331988...