Promise.resolve().
then(()=>{
console.log(0);
return Promise.resolve(4)
})
.then(res=>{
console.log(res)
});
Promise.resolve()
.then(()=>{
console.log(1)
})
.then(res=>{
console.log(2)
})
.then(res=>{
console.log(3)
})
.then(res=>{
console.log(5)
})
.then(res=>{
console.log(6)
})
// 打印
0
1
2
3
4
5
6