mirror of
https://github.com/ruanyf/es6tutorial.git
synced 2025-05-27 12:22:21 +00:00
commit
49b496c704
@ -633,7 +633,7 @@ console.log('one');
|
|||||||
// three
|
// three
|
||||||
```
|
```
|
||||||
|
|
||||||
上面代码中,`setTimeout(fn, 0)`在下一轮“事件循环”开始时执行,`Promise.resolve()`在本轮“事件循环”结束时执行,`console.log(’one‘)`则是立即执行,因此最先输出。
|
上面代码中,`setTimeout(fn, 0)`在下一轮“事件循环”开始时执行,`Promise.resolve()`在本轮“事件循环”结束时执行,`console.log('one')`则是立即执行,因此最先输出。
|
||||||
|
|
||||||
## Promise.reject()
|
## Promise.reject()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user