Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Javascript Array Intersect

DZone's Guide to

Javascript Array Intersect

·
Free Resource
Simple intersect function


Object.extend(Array.prototype, {
  intersect: function(array){
    return this.findAll( function(token){ return array.include(token) } );
  }
});
Topics:

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}