当前位置:网站首页>Event Loop

Event Loop

2020-12-07 10:12:26 Irving the procedural ape

article

console.log('1');setTimeout(function() { console.log('2'); process.nextTick(function() {  console.log('3'); }) new Promise(function(resolve) {  console.log('4');  resolve(); }).then(function() {  console.log('5') })})process.nextTick(function() { console.log('6');})new Promise(function(resolve) { console.log('7'); resolve();}).then(function() { console.log('8')})setTimeout(function() { console.log('9'); process.nextTick(function() {  console.log('10'); }) new Promise(function(resolve) {  console.log('11');  resolve(); }).then(function() {  console.log('12') })})
  • The whole code enters as a macro task ,.........

版权声明
本文为[Irving the procedural ape]所创,转载请带上原文链接,感谢
https://chowdera.com/2020/12/202012071000300082.html