Answers for "how to find out how many times an item is repeated in an array js"

0

how to count duplicates in an array javascript

arr.reduce((b,c)=>((b[b.findIndex(d=>d.el===c)]||b[b.push({el:c,count:0})-1]).count++,b),[]);
Posted by: Guest on December-16-2020

Code answers related to "how to find out how many times an item is repeated in an array js"

Code answers related to "Javascript"

Browse Popular Code Answers by Language