Rod Whiteley wrote:
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.
In JavaScript 1.7, coming soon to a browser near you, the "let" keyword
will let you define variables with block scope:
http://developer.mozilla.org/en/docs/New_in_JavaScript_1.7#Block_scope_with_let
-myk
_______________________________________________
Project_owners mailing list
[email protected]
http://mozdev.org/mailman/listinfo/project_owners