Using Reduce Method Javascript Interview Bit