Javascript Map and Reduce Functions
I was working on a project where I needed to do an aggregate sum of a specific property of an array of objects. Consider the following: var obj = [ { thread: ‘An Essay on Javascript’, comments: 9 }, { thread: ‘An Essay on HTML’, comments: 2 }, { thread: …