Does the `[...oldArr, ...elementsToPushArr]` pattern take care of that for you? I've always assumed it's much less performant than your form would be, but I (naively) suppose the implementation could be optimized like anything else
On Wed, May 23, 2018 at 8:01 AM <es-discuss-requ...@mozilla.org> wrote: > Send es-discuss mailing list submissions to > es-discuss@mozilla.org > > To subscribe or unsubscribe via the World Wide Web, visit > https://mail.mozilla.org/listinfo/es-discuss > or, via email, send a message with subject or body 'help' to > es-discuss-requ...@mozilla.org > > You can reach the person managing the list at > es-discuss-ow...@mozilla.org > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of es-discuss digest..." > Today's Topics: > > 1. Array.prototype.append ? (Jordi Bunster) > > > > ---------- Forwarded message ---------- > From: Jordi Bunster <jbuns...@microsoft.com> > To: "es-discuss@mozilla.org" <es-discuss@mozilla.org> > Cc: > Bcc: > Date: Wed, 23 May 2018 02:45:25 +0000 > Subject: Array.prototype.append ? > Has anyone ever suggested Array.prototype.append as an > Array.prototype.push which returns the array itself? It would be > reduce-friendly, same as Set.prototype.add and Map.prototype.set. > > Someone has to have, right? 😊 > _______________________________________________ > es-discuss mailing list > es-discuss@mozilla.org > https://mail.mozilla.org/listinfo/es-discuss >
_______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss