0
我有一個數組,並且需要查找一個字符串有多少匹配。計算數組中的匹配數Lodash
Array = ['car','road','car','ripple'];
Array.forEach(function(element) {
// Here for every element need to see how many there are in the same array.
// car = 2
//road = 1
//...
}, this);