why can we access var before the initialization even tho the value is undefined
but an error pops up if the same is done with let ???
For further actions, you may consider blocking this person and/or reporting abuse
For further actions, you may consider blocking this person and/or reporting abuse
Nik L. -
Rajesh Dhiman -
Vinod Chandra -
Nicolas Frizzarin -
Top comments (1)
Hoisting
var
let
For deeper understanding, you need to study Execution Context and Lexical Environment.