# \_.after（n次后出发某个函数）

**语法：**

```javascript
_.after(n, func)
```

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

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

**描述：**

[`_.before`](https://lodash.com/docs/4.17.10#before)的反向函数;此方法创建一个函数，当他被调用`n`或更多次之后将马上触发`func`。

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

**参数：**

* `n (number)`: func 方法应该在调用多少次后才执行。
* `func (Function)`: 用来限定的函数。

**返回值：**

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

**例子：**

```javascript
var saves = ['profile', 'settings'];

var done = _.after(saves.length, function() {
  console.log('done saving!');
});

_.forEach(saves, function(type) {
  asyncSave({ 'type': type, 'complete': done });
});
// => Logs 'done saving!' after the two async saves have completed.
```
