Promise.resolve()
.then(()=>{
console.log(1)
})
.then(()=>{
console.log(2)
})
.then(()=>{
console.log(3)
return Promise.resolve()
})
.then(()=>{
console.log('??',4)
})
.then(()=>{
console.log(5)
})
Promise.resolve()
.then(()=>{
console.log('AAA')
})
.then(()=>{
console.log('BBB')
})
.then(()=>{
console.log('CCC')
})
.then(()=>{
console.log('DDD')
})
.then(()=>{
console.log('EEE')
})
.then(()=>{
console.log('FFF')
})
.then(()=>{
console.log('GGG')
})
1
AAA
2
BBB
3
CCC
DDD
EEE
??4 // 中间创建新的promise时等待两个.then()
FFF
5
GGG
因缺思厅