DEV Community

Discussion on: How The Hell Do I use Map?

Collapse
 
joelnet profile image
JavaScript Joel

If you want to mutate an array in place, you could also use reduce. While it's recommend to create a new array, it is technically possible to mutate an existing array with reduce.