Skip to content

Instantly share code, notes, and snippets.

@ceau
ceau / intersection.js
Created September 26, 2017 08:15
js array intersection
var intersection = function(){
return Array.from(arguments).reduce(function(previous, current){
return previous.filter(function(element){
return current.indexOf(element) > -1;
});
});
};