NIUCLOUD是一款SaaS管理后台框架多应用插件+云编译。上千名开发者、服务商正在积极拥抱开发者生态。欢迎开发者们免费入驻。一起助力发展! 广告
## prototype.commit + [link](./prototype-commit "Link to this entry.") + [source](https://github.com/lodash/lodash/blob/4.5.0正式版/lodash.src.js#L7315 "View in source.") + [npm](https://www.npmjs.com/package/lodash.prototype.commit "See the npm package.") ``` _.prototype.commit() ``` 执行链式队列并返回结果 ### 返回值 (Object) 返回 `lodash` 的包装实例 ### 示例 ``` 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] ```