Clearly the real good refactor was using reduce instead of filter / map.
No need to loop twice over the array. Always use reduce if there are chained methods going through arrays
No need to loop twice over the array. Always use reduce if there are chained methods going through arrays
No comments yet.