js/libs/ember-1.5.1.js
function(array1, array2) {
    var intersection = [];

    utils.forEach(array1, function(element) {
      if (utils.indexOf(array2, element) >= 0) {
        intersection.push(element);
      }
    });

    return intersection;
  }
function(array1, array2) {
    var intersection = [];

    utils.forEach(array1, function(element) {
      if (utils.indexOf(array2, element) >= 0) {
        intersection.push(element);
      }
    });

    return intersection;
  }
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.