Creation of the `arguments` object

Yusuke Suzuki utatane.tea at gmail.com
Wed Jul 4 08:18:10 PDT 2012


In the execution phase, their behavior is different.

section 12.2
http://ecma-international.org/ecma-262/5.1/#sec-12.2

    var arguments = undefined

performs PutValue with reference and undefined.

1. Let lhs be the result of evaluating Identifier as described in 11.1.2.
> 2. Let rhs be the result of evaluating Initialiser.
> 3. Let value be GetValue(rhs).
> 4. Call PutValue(lhs, value).
> 5. Return a String value containing the same sequence of characters as in
> the Identifier.


But

   var arguments;

doesn't perform any assignment.

1. Return a String value containing the same sequence of characters as in
> the Identifier.


Regards,
Yusuke Suzuki
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20120705/0dbf9b0e/attachment.html>


More information about the es-discuss mailing list