Closed dant00ine closed 6 years ago
To me, this makes it sound like var bindings can 'bleed up' up a level into the parent scope or something.
Isn't that exactly what they do?
Oops, what I meant to say was: it makes it sound like they will ‘bleed up’ even through function scopes (not just blocks).
Actually, now that I read it again a day later it makes perfect sense. Sorry for the trouble. Love your book.
I found the following sentence in 03_functions Summary confusing.
To me, this makes it sound like
var
bindings can 'bleed up' up a level into the parent scope or something. Even though blocks were mentioned a couple sentences back, it was still unclear to me that this sentence implies that: "Bindings declared with var [within blocks that aren't functions] behave differently..."On the other hand, I find this explanation from the MDN docs for let
to be much more clear.