gaz Heyes <[email protected]>:
> I found this which was quite surprising:
>
> !function x(){x=123;alert(x);}()
>
> What's the value of x without running the code?
Should be `function x(){x=123;alert(x);}`, while NFE adds in front of
the scope chain `x` which value can't be overwritten so in the body of
function:
x=123;
will silently fail and `alert(x)' should alerting `function
x(){x=123;alert(x);}`.
Am I correct?
--
To view archived discussions from the original JSMentors Mailman list:
http://www.mail-archive.com/[email protected]/
To search via a non-Google archive, visit here:
http://www.mail-archive.com/[email protected]/
To unsubscribe from this group, send email to
[email protected]