in reply to Re^4: Closures and scope of lexicalsin 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; [download]
var foo; foo = 1; [download]