Y
Hacker News
new
|
ask
|
show
|
jobs
by
cheald
5287 days ago
That makes plenty of sense to me; when do you ever want to leak a for loop counter to an outer scope?
1 comments
satyr
5287 days ago
And when do you ever want to leak local variables to an outer scope? Never.
Not to mention that loop counters are no different than other `var`iables in JS.
link
cheald
5286 days ago
You do want to sometimes reference outer scope variables from inner scopes, though. The only difference between a leaked local and a properly referenced global is usage semantics.
link
Not to mention that loop counters are no different than other `var`iables in JS.