public/lib/emberjs/ember.js
function intersection(array1, array2) {
      var result = [];
      forEach(array1, function(element) {
        if (indexOf(array2, element) >= 0) {
          result.push(element);
        }
      });

      return result;
    }
function intersection(array1, array2) {
      var result = [];
      forEach(array1, function(element) {
        if (indexOf(array2, element) >= 0) {
          result.push(element);
        }
      });

      return result;
    }
function intersection ( array1 , array2 ) { var result = [ ] ; forEach ( array1 , function ( element ) { if ( indexOf ( array2 , element ) >= 0 ) { result . push ( element ) ; } } ) ; return result ; }
Calculates the intersection of two arrays. This method returns a new array
filled with the records that the two passed arrays share with each other.
If there is no intersection, an empty array will be returned.

```javascript
var array1 = [1, 2, 3, 4, 5];
var array2 = [1, 3, 5, 6, 7];

Ember.EnumerableUtils.intersection(array1, array2); // [1, 3, 5]

var array1 = [1, 2, 3];
var array2 = [4, 5, 6];

Ember.EnumerableUtils.intersection(array1, array2); // []
```

@method intersection
@param {Array} array1 The first array
@param {Array} array2 The second array

@return {Array} The intersection of the two passed arrays.
Calculates the intersection of two arrays . This method returns a new array filled with the records that the two passed arrays share with each other . If there is no intersection an empty array will be returned .