Object.assign and __proto__ property

Rick Waldron waldron.rick at gmail.com
Tue Oct 22 06:10:20 PDT 2013


On Tue, Oct 22, 2013 at 6:41 AM, André Bargull <andre.bargull at udo.edu>wrote:

> Traceur has:
>>
>> function assign(target, source) {
>>    var props = $getOwnPropertyNames(source);
>>    var p, length = props.length;
>>    for (p = 0; p < length; p++) {
>>      target[props[p]] = source[props[p]];
>>    }
>>    return target;
>> }
>>
>> Which is correct.
>>
>
> Almost correct ;-)
>

That was copied verbatim:
https://github.com/google/traceur-compiler/blob/master/src/runtime/runtime.js#L308-L316

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


More information about the es-discuss mailing list