On 01-07-2006 14:55, Eric H. Jung wrote:
for (var i=0,j="foo";i<5; i++) {dump(i);}
dump(j);

What breaks?  And what does 'everything "global"' mean?

The var creates both i and j in the current scope. So if your code is global code, both i and j are global; if your code is function code, both i and j are local. In JavaScript, local always means local to a function--there is no other kind of local.

--
Rod Whiteley
_______________________________________________
Project_owners mailing list
[email protected]
http://mozdev.org/mailman/listinfo/project_owners

Reply via email to