Assignment to method invocation result

Rick Waldron waldron.rick at gmail.com
Thu May 15 11:47:34 PDT 2014


On Thu, May 15, 2014 at 2:27 PM, C. Scott Ananian <ecmascript at cscott.net>wrote:

> and what about
>
> obj []= 'propertyName'
>
> as well?
>  --scott
>>

I imagined .= would do both, but I don't think my suggestion should be
taken seriously. In fact, your example illustrates a major flaw (that
exists in either proposal/suggestion), that I don't immediately know how I
would answer:

var o = { foo: "bar" };
o .= foo;

Is `o` now a string with the value "bar"?? I think that would cause more
problems than its worth.

Rick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20140515/7ec6adfb/attachment.html>


More information about the es-discuss mailing list