Back to Lo

Core Product

docs/data/core-product.md

1.53.0144 B
Original Source

Calculates the product of the values in a collection. Returns 1 for nil or empty collections.

go
lo.Product([]int{1, 2, 3, 4, 5})
// 120