You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when you declare a variable with var, it will be hoisted and set value as undefined.
I think let and const are so similar but they are passed the default value 'ReferenceError'
The text was updated successfully, but these errors were encountered:
@DanielWLam you are correct. let and const declarations are hoisted, however if you try to reference these variables before they are declared, a ReferenceError is thrown (regardless of the hoisting. This is also known as the Temporal Dead Zone.
when you declare a variable with var, it will be hoisted and set value as undefined.
I think let and const are so similar but they are passed the default value 'ReferenceError'
The text was updated successfully, but these errors were encountered: