resolve();
}).then(()=>{
console.log('1');
return 2
}).then(data=>{
console.log(data);
})
new Promise((resolve,reject)=>{
resolve();
}).then(()=>{
console.log(3);
return 4
}).then(data=>{
console.log(data);
})
理论上也有1234,1342,甚至2134等情况,但概率比较小。你需要理解的是这两个promise几乎是并发的,但最终是根据其主体程序执行时长来的,并非固定的1324