> 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/function/spread.md).

# \_.spread

**语法：**

```javascript
_.spread(func, [start=0])
```

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

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

**描述：**

创建一个函数，调用`func`时，`this`绑定到创建的新函数，把参数作为数组传入，类似于[`Function#apply`](http://www.ecma-international.org/ecma-262/6.0/#sec-function.prototype.apply).

> **Note:**&#x8FD9;个方法基于[spread operator](https://mdn.io/spread_operator).

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

**参数：**

* `func (Function)`: 要应用传播参数的函数。
* `[start=0] (number)`: spread 参数的开始位置.

**返回值：**

* `(Function)`: 返回新的函数。

**例子：**

```javascript
var say = _.spread(function(who, what) {
  return who + ' says ' + what;
});

say(['fred', 'hello']);
// => 'fred says hello'

var numbers = Promise.all([
  Promise.resolve(40),
  Promise.resolve(36)
]);

numbers.then(_.spread(function(x, y) {
  return x + y;
}));
// => a Promise of 76
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://lodash.shujuwajue.com/function/spread.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
