Back to Lo

Core Countvalues

docs/data/core-countvalues.md

1.53.0136 B
Original Source

Counts the number of occurrences of each element in the collection.

go
lo.CountValues([]int{1, 2, 2})
// map[int]int{1: 1, 2: 2}