Hacker News new | ask | show | jobs
by joshuacc 3253 days ago
Sort of, but the effect is very different due to the "temporal dead zone." Attempting to access a variable declared with `let/const` or const before the declaration will throw an error, vs just getting `undefined` for a variable declared with `var`.
1 comments

I'm a bit confused. What does "hoisted" mean in this context if accessing the variable before declaration will throw an error?