DEV Community

Discussion on: Javascript: how to merge multiple objects with sum of values

 
timhlm profile image
moth

This is right on the money. There’re certain times when mutating things makes sense, and others when generating a new array with reduce is a better choice. It’s all about knowing when to use the right tool.