Answers for "javascript get duplicates of multiple arrays"

1

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

javascript create array with repeated values

Array(5).fill(2)
//=> [2, 2, 2, 2, 2]
Posted by: Guest on February-17-2021

Code answers related to "javascript get duplicates of multiple arrays"

Code answers related to "Javascript"

Browse Popular Code Answers by Language