doc: add some definition section
This commit is contained in:
1 parent
4bd7b17180
commit
1e8670995d
1 file changed
+7
-1
@@ -26,4 +26,10 @@ JavaScript用于交互和通信
|
||||
我们将函数作为参数传递给其他函数,以便当我们知道预期发生的事情时,可以“稍后回调”。
|
||||
回调在事件驱动编程中是一个非常强大的特性。
|
||||
为什么你认为在JavaScript语言中有能力将回调函数作为参数传递给其他函数,如JS中的addEventListener和setTimeout是有用的?
|
||||
[asynchronous](/images/asynchronous.png)
|
||||
[asynchronous](/images/asynchronous.png)
|
||||
|
||||
# 一些定义
|
||||
同步意味着实时通信,其中每一方都能立即接收和处理消息/指令
|
||||
- 例如:电话
|
||||
异步是指在两个或多个参与方之间进行通信,每一方都在方便的时候接收和处理消息/指令
|
||||
- 例如:短信,微信,等等。。。
|
||||
Reference in new issue
Block a user