Using Reduce Method Javascript Interview Questions