心有所想 念念不忘
tabliu

理解 JS 中的回调函数

引用google原译文:“A callback is a function that is passed as an argument to another function and is executed after its parent function has completed”。

理解有三层意思:

1. 身份:首先回调的是一个函数;

2. 作用:作为一个参数放置在另一个函数中;

3. 使用:只有父级函数执行完后才会执行回调函数。

(0)

  • 暂无回复

送出评论

数据统计:24 小时内发布0条 ... 一周内发布0条 ... 总发布数 786