Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript get same elments from multiple arrays

var result = arrays.shift().filter(function(v) {
    return arrays.every(function(a) {
        return a.indexOf(v) !== -1;
    });
});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #javascript #elments #multiple #arrays
ADD COMMENT
Topic
Name
1+3 =