find intesect of two arrays js code example
Example 1: javascript difference between two arrays
let difference = arr1.filter(x => !arr2.includes(x));
Example 2: javascript get same elments from multiple arrays
var result = arrays.shift().filter(function(v) {
return arrays.every(function(a) {
return a.indexOf(v) !== -1;
});
});