Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

2
  • 6
    This doesn't append the value to the array, which is what the OP asked. This creates a new array, with the contents of the old array and the new elements. Really, this is Array.concat. Commented Sep 19, 2018 at 10:03
  • Which feature of ES6 in particular? What is the (official) name of the feature? Commented Aug 14, 2021 at 15:35