ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
## pullAll + [link](./pullAll "Link to this entry.") + [source](https://github.com/lodash/lodash/blob/4.5.0正式版/lodash.src.js#L6279 "View in source.") + [npm](https://www.npmjs.com/package/lodash.pullall "See the npm package.") ``` _.pullAll(array, values) ``` 这个方式类似 `_.pull`,除了它接受数组形式的一系列值。 **注意:** 不同于 `_.difference`,这个方法会改变数组。 ### 参数 1. array (Array) 需要调整的数组 2. values (Array) 要移除的值 ### 返回值 (Array) 返回数组本身 ### 示例 ``` var array = [1, 2, 3, 1, 2, 3]; _.pullAll(array, [2, 3]); console.log(array); // => [1, 1] ```