# \_.prototype.commit

**语法：**

```javascript
_.prototype.commit()
```

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

**描述：**

执行链式队列并返回结果。

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

**返回值：**

* `(Object)`: 返回 lodash 的包装实例。

**例子：**

```javascript
var array = [1, 2];
var wrapped = _(array).push(3);

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

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

wrapped.last();
// => 3

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