then
function t(){
return new Promise((resolve, reject)=>{
setTimeout(()=>{
resolve(0)
},1000)
})
}
function t1(){
return new Promise((resolve, reject)=>{
setTimeout(()=>{
resolve(1)
},2000)
})
}
t().then((e)=>{
console.log(e)
return t1()
}).then((e)=>{
console.log(e)
})
网友评论