On 06.09.2011 23:37, gaz Heyes wrote:
On 6 September 2011 18:38, Asen Bozhilov <asen.bozhi...@gmail.com <mailto:asen.bozhi...@gmail.com>> wrote:

    will silently fail and `alert(x)' should alerting `function
    x(){x=123;alert(x);}`.

    Am I correct?


Yeah you cannot overwrite "x" in the function expression unless you declare it first


In case a of declaration, you declare a variable, not a FE ;)

And the name of a function is a different property, than a name of a binding in an environment to which it's bound.

P.S.: per both, ES3 and ES5 a name of a NFE here has {DontDelete + ReadOnly} attributes (in ES5 -- it's "immutable binding"). So, an implementation which shows you the function instead of `123` is correct.

Dmitry.

--
To view archived discussions from the original JSMentors Mailman list: 
http://www.mail-archive.com/jsmentors@jsmentors.com/

To search via a non-Google archive, visit here: 
http://www.mail-archive.com/jsmentors@googlegroups.com/

To unsubscribe from this group, send email to
jsmentors+unsubscr...@googlegroups.com

Reply via email to