doc: add callbacks section
This commit is contained in:
1 parent
2a3d531c4c
commit
2f663405ca
1 file changed
+7
@@ -86,3 +86,10 @@ eatPizza();
|
|||||||
// twiddle thumbs
|
// twiddle thumbs
|
||||||
payForPizza();
|
payForPizza();
|
||||||
```
|
```
|
||||||
|
|
||||||
|
# 回调
|
||||||
|
回调在事件驱动编程中是一个非常强大的特性。
|
||||||
|
- 比例:在电话答录机上留下你的电话号码
|
||||||
|
|
||||||
|
为什么你认为在JavaScript语言中有能力将回调函数作为参数传递给其他函数,如JS中的addEventListener和setTimeout是有用的?
|
||||||
|
- 使异步执行!
|
||||||
Reference in new issue
Block a user