用AI赚第一桶💰低成本搭建一套AI赚钱工具,源码可二开。 广告
## partialRight + [link](./partialRight "Link to this entry.") + [source](https://github.com/lodash/lodash/blob/4.5.0正式版/lodash.src.js#L9012 "View in source.") + [npm](https://www.npmjs.com/package/lodash.partialright "See the npm package.") ``` _.partialRight(func, [partials]) ``` 这个函数类似 `_.partial`,除了它是从右到左预设参数的。 这个 _.partialRight.placeholder 的值,默认是以_ 作为附加部分参数的占位符。 **注意:** 这个方法不会设置 "length" 到函数上。 ### 参数 1. func (Function) 需要预设的函数 2. [partials] (...*) 预设的参数 ### 返回值 (Function) 返回预设参数的函数 ### 示例 ``` var greet = function(greeting, name) { return greeting + ' ' + name; }; var greetFred = _.partialRight(greet, 'fred'); greetFred('hi'); // => 'hi fred' // 使用了占位符 var sayHelloTo = _.partialRight(greet, 'hello', _); sayHelloTo('fred'); // => 'hello fred' ```