通知短信+运营短信,5秒速达,支持群发助手一键发送🚀高效触达和通知客户 广告
## rest + [link](./rest "Link to this entry.") + [source](https://github.com/lodash/lodash/blob/4.5.0正式版/lodash.src.js#L9063 "View in source.") + [npm](https://www.npmjs.com/package/lodash.rest "See the npm package.") ``` _.rest(func, [start=func.length-1]) ``` 创建一个调用 `func` 的函数。 `this` 绑定到这个函数 并且 从 `start` 之后的参数都作为数组传入。 **注意:** 这个方法基于[rest parameter](https://mdn.io/rest_parameters) ### 参数 1. func (Function) 要应用的函数 2. [start=func.length-1] (number) 从第几个参数开始应用 ### 返回值 (Function) 返回新的函数 ### 示例 ``` var say = _.rest(function(what, names) { return what + ' ' + _.initial(names).join(', ') + (_.size(names) > 1 ? ', & ' : '') + _.last(names); }); say('hello', 'fred', 'barney', 'pebbles'); // => 'hello fred, barney, & pebbles' ```