Reduce Method In Array Javascript Length