Y
Hacker News
new
|
ask
|
show
|
jobs
by
Klathmon
3270 days ago
The scope of variables isn't "broken", just different. Functional scope is a perfectly valid way to scope variables.
Luckily ES2015 introduced blocked scoped variables (const and let), so this is no longer an issue.