- Callback
- Event
- Promise
- Async/await (node)
- Reactive
Callback (回调)
1 | var friends = ["Mike", "Stacy", "Andy", "Rick"]; |
Event
1 |
|
Promise
下面是个流程
mozilla 文档
1 | var promise = new Promise(function(resolve, reject) { |
Async / Await
c# 的语法.
1 | async function asyncFun () { |
Reactive
前几个月谢了一篇关于 reactive 的文章. reactive 像 event 和 promise then 链子的结合.