DEV Community

Discussion on: 🔥 Quick Tip: Update an array and avoid mutation

Collapse
 
upieez profile image
Samuel Huang

so this doesn't mutate the people array but creates a new one, slicedpeople, with elements from people right?

Collapse
 
helderberto profile image
Helder Burato Berto

Yep! Avoiding the mutation in the "people" array :)