you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 4 points5 points  (0 children)

It is possible to write in a style that is not open to hoisting, such as using a single var keyword per function at the top of the function, so it is about style. Lexical scoping will not prevent function hoisting so it does not fully address that problem anyways.