'let and const (the new ways to declare variables in Javascript) do not support hoisting.' is that right?
These variables are hoisted but not assigned a value 'undefined' in the compilation phase of the execution context (unlike the var variable). These variables are initialized only in the execution phase. The time between the declaration of the variable and the initialization is called the temporal dead zone and accessing this variable in this window will throw a reference error.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
'let and const (the new ways to declare variables in Javascript) do not support hoisting.' is that right?
These variables are hoisted but not assigned a value 'undefined' in the compilation phase of the execution context (unlike the var variable). These variables are initialized only in the execution phase. The time between the declaration of the variable and the initialization is called the temporal dead zone and accessing this variable in this window will throw a reference error.