Hiya,
>> Array.prototype.reduce which is by default { [[Writable]]: true,
>> [[Enumerable]]: false, [[Configurable]]: true } will change to
>> [[Enumerable]]: true when:
>>
>> Array.prototype.reduce = function() {…};
>
> Why do you think this should change [[Enmerable]] to true??
Oh, I *didn't say* I think it should. I said we were trying to explain
an existing behavior we were seeing.
>>
>> Would you all help point to where this is defined in spec?
>
> It isn't. Simply assigning a new value to an already existing own data
> property isn't supposed to change any attributes.
Awesome! That was our conclusion too. It was late Kit and I missed
trying it in other implementations (instead we dug into spec because
we thought it was odd). It turns out V8 (Chrome, Node.js) has a bug
that will make non-enumerable properties enumerable by assigning a new
value as in my previous snippet :O
Thanks again,
JDD
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss