Yes, JS's var is function-scoped at the narrowest. It's even retroactive such that
is equivalent tofoo = 1; var foo;
var foo; foo = 1;
In reply to Re^5: Closures and scope of lexicals
by ikegami
in thread Closures and scope of lexicals
by haj
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |