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 <[email protected]> wrote:

> Send es-discuss mailing list submissions to
>         [email protected]
>
> 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
>         [email protected]
>
> You can reach the person managing the list at
>         [email protected]
>
> 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 <[email protected]>
> To: "[email protected]" <[email protected]>
> 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
> [email protected]
> https://mail.mozilla.org/listinfo/es-discuss
>
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to