node版本10.16.3为什么运行结果跟讲解的不一样
来源:16-7 异步代码场景题-考察你对nodejs异步编程的理解
1007123589qaz
2020-11-08
弄的v10.16.3运行,promise2 比 async1 end先打印
script start
async1 start
async2
promise1
script end
nextTick
promise2
async1 end
setTimeout
immediate
node v14.15.0 打印结果如下
script start
async1 start
async2
promise1
script end
nextTick
async1 end
promise2
setTimeout
immediate
写回答
1回答
-
双越
2020-11-09
node 升级到最新版吧,
00