Reduce Function In Javascript Array Of Objects Example