DEV Community

Discussion on: Javascript Hoisting

Collapse
 
smlka profile image
Andrey Smolko

you said about TDZ:
"It is Time taken between declaring the variable(using let or const) and initializing the variable."
IMHO It will be super useful to mention when exactly let/const variables declaring/creating. The answer - when new scope is instantiated. So TDZ always starts from the first line of the scope and ends at line with let/const a =...

and like for attempt describe hoisting for let/const=)

Collapse
 
naveenchandar profile image
Naveenchandar

I should've elaborated that part but thanks ๐Ÿ™‚.