Date

“Array” Methods

_.pullAll(array, values)

source npm package

This method is like _.pull except that it accepts an array of values to remove.

Note: Unlike _.difference, this method mutates array.

引入版本

4.0.0

参数
array (Array) : The array to modify.
values (Array) : The values to remove.

返回值
(Array) : Returns array.

示例
var array = ['a', 'b', 'c', 'a', 'b', 'c'];
 
_.pullAll(array, ['a', 'c']);
console.log(array);
// => ['b', 'b']