new Promise((resolve, reject) => { console.log("async1 start"); console.log("async2");
resolve(Promise.resolve());
}).then(() => { console.log("async1 end");
});new Promise(function(resolve) { console.log("promise1");
resolve();
}).then(function() { console.log("promise2");
}).then(function() { console.log("promise3");
}).then(function() { console.log("promise4");
});执行结果如下:async1 startasync2promise1promise2promise3async1 endpromise4求大神解释结果为什么是这样的?
添加回答
举报
0/150
提交
取消