2011/9/6 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?

The value of x depends on the environment. In case of V8 the x is not
defined, so a console.log(x) after the function is run will result in
a ReferenceError. In case of Fx the result will be REALLY weird, as it
was a list of plugins for me. In IE it will most likely produce the
number 123.

-- 
Poetro

-- 
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]

Reply via email to