in reply to Re^4: Closures and scope of lexicals
in thread Closures and scope of lexicals

Yes, JS's var is function-scoped at the narrowest. It's even retroactive such that

foo = 1; var foo;
is equivalent to
var foo; foo = 1;