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

# \_.delay

**语法：**

```javascript
_.delay(func, wait, [args])
```

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

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

**描述：**

将数组（array）拆分成多个 size 长度的区块，并将这些区块组成一个新数组。 如果array 无法被分割成全部等长的区块，那么最后剩余的元素将组成一个区块。

**开始版本：**&#x30;.1.0

**参数：**

* `func (Function)`: 要延迟的函数。
* `wait (number)`: 要延迟的毫秒数。
* `[args] (...*)`: 会在调用时传入到 func 的参数。

**返回值：**

* `(number)`: 返回计时器 id

**例子：**

```javascript
_.delay(function(text) {
  console.log(text);
}, 1000, 'later');
// => 一秒后输出 'later'。
```
