function remove(array, predicate, thisArg) {
      var index = -1,
          length = array ? array.length : 0,
          result = [];

      predicate = getCallback(predicate, thisArg, 3);
      while (++index < length) {
        var value = array[index];
        if (predicate(value, index, array)) {
          result.push(value);
          splice.call(array, index--, 1);
          length--;
        }
      }
      return result;
    }
Removes all elements from `array` that `predicate` returns truthy for
and returns an array of the removed elements. The predicate is bound to
`thisArg` and invoked with three arguments; (value, index, array).

If a property name is provided for `predicate` the created "_.pluck" style
callback returns the property value of the given element.

If an object is provided for `predicate` the created "_.where" style callback
returns `true` for elements that have the properties of the given object,
else `false`.

**Note:** Unlike `_.filter`, this method mutates `array`.

@static
@memberOf _
@category Array
@param {Array} array The array to modify.
@param {Function|Object|string} [predicate=_.identity] The function invoked
 per iteration. If a property name or object is provided it is used to
 create a "_.pluck" or "_.where" style callback respectively.
@param {*} [thisArg] The `this` binding of `predicate`.
@returns {Array} Returns the new array of removed elements.
@example

var array = [1, 2, 3, 4];
var evens = _.remove(array, function(n) { return n % 2 == 0; });

console.log(array);
// => [1, 3]

console.log(evens);
// => [2, 4]