re: 10 JavaScript array methods you should know VIEW POST

VIEW PARENT COMMENT VIEW FULL DISCUSSION
 

My main use case for using .forEach before discovering .reduce was because I wanted to transform one object into a new object with a different shape. I'd create an empty object and then .forEach the original object's Object.entities/keys to add properties to the empty object, whereas this is more concise by simply using a .reduce

code of conduct - report abuse