Here you can find the source of intersect(arr)
Array.prototype.intersect = function (arr) { return this.filter(function (el, idx) { return arr.indexOf(el) >= 0; }).unique();// w w w . j av a2 s . co m };
Array.prototype.intersect = function(otherArray) [ i for each( i in this ) if( otherArray.has( i ) ) ];
Array.prototype.intersect = function(a) { return this.filter(function(x) { return a.indexOf(x) >= 0; });
Array.intersect = function(a, b){ return a.uniquelize().each(function(o){return b.contains(o) ? o : null}); };
Array.prototype.intersect = function(ar) { var results = []; for (var i = 0, len = this.length; i < len; i++) { for (var j = 0, len2 = ar.length; j < len2; j++) { if (this[i] === ar[j]) { var found = false; for (var k = 0, len3 = results.length; k < len3; k++) { if (ar[j] === results[k]) { found = true; ...
Array.prototype.intersect = function (arr, comparer) { comparer = comparer || EqualityComparer; return this.distinct(comparer).where(function (t) { return arr.contains(t, comparer); }); };
Array.prototype.intersect = function (array) { array = Array.isArray(array) ? array : []; return this.filter(function (n) { return array.indexOf(n) != -1; }); };
Array.prototype.intersect = function(array){ return(this.filter(function(n){ return array.include(n); })); };
Array.prototype.intersect = function(array) { return this.filter((x) => array.indexOf(x) != -1); };