Why "remove" and not `.filter`, to produce a new array? On Sun, Feb 3, 2019 at 9:56 PM #!/JoePea <j...@trusktr.io> wrote:
> I sometimes find myself doing things like > > ```js > this.children.splice(this.children.indexOf(child), 1) > ``` > > but it seems that it will iterate the array twice. Maybe a new method can > be introduced so engines can optimize it: > > ```js > this.children.remove(child) > // or > this.children.remove(...childrenToRemove) > ``` > _______________________________________________ > 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