Answers for "find duplicates on two params array js"

3

javascript get same elments from multiple arrays

var result = arrays.shift().filter(function(v) {
    return arrays.every(function(a) {
        return a.indexOf(v) !== -1;
    });
});
Posted by: Guest on August-27-2020
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 "find duplicates on two params array js"

Code answers related to "Javascript"

Browse Popular Code Answers by Language