> For the complete documentation index, see [llms.txt](https://lodash.shujuwajue.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://lodash.shujuwajue.com/array/pullat.md).

# \_.pullAt（删除数组中的元素）

**语法：**

```javascript
_.pullAt(array, [indexes])
```

**源代码链接：**[source](https://github.com/lodash/lodash/blob/4.17.10/lodash.js#L7808)

**npm包链接：**[npm package](https://www.npmjs.com/package/lodash.pullat)

**描述：**

根据索引`indexes`，移除`array`中对应的元素，并返回被移除元素的数组。

> **Note:**&#x548C;[`_.at`](https://lodash.com/docs/4.17.10#at)不同, \_.pullAt这个方法会改变数组`array`。

**开始版本：**&#x33;.0.0

**参数：**

* `array (Array)`: 要修改的数组。
* `[indexes] (...(number|number[]))`: 要移除元素的索引。

**返回值：**

* `(Array)`: 返回移除元素组成的新数组。

**例子：**

```javascript
var array = ['a', 'b', 'c', 'd'];
var pulled = _.pullAt(array, [1, 3]);

console.log(array);
// => ['a', 'c']

console.log(pulled);
// => ['b', 'd']
```
