How To Use The Reduce Method In Javascript