Why does it matter that in Javascript, scope is function-level, not block-level?
- by Jian Lin
In the question
http://stackoverflow.com/questions/1451009/javascript-infamous-loop-problem
the accepted answer from Christoph's says that
JavaScript's scopes are
function-level, not block-level
What if Javascript's scopes are block-level, then would the Infamous Loop problem still occur? But will there be a different (or easier way) to fix it?
Is it as opposed to other languages, where using a { would start a new scope?