print the common varaibles 2 arrays js code example
Example 1: get common values from two arrays javascript
let intersection = arrA.filter(x => arrB.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;
});
});