> function() {
> var x = 10; // local scope
> y = 20; // no 'var' keyword used hence global scope}
>
> alert(window.x); // undefined
> alert(window.y); // 20
Yes - but if you do outside the function scope it does get set.
I guess it's a bit like the 'with' operator ?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"jQuery Development" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/jquery-dev?hl=en
-~----------~----~----~----~------~----~------~--~---