<script>
function t(){
return new Promise((resolve, reject)=>{
setTimeout(()=>{
resolve(0)
},1000)
})
}
function t1(){
return new Promise((resolve, reject)=>{
setTimeout(()=>{
resolve(1)
},1000)
})
}
function t2(){
return new Promise((resolve, reject)=>{
setTimeout(()=>{
resolve(2)
},1000)
})
}
t().then((e)=>{
console.log(e)
return t1()
}).then((e)=>{
console.log(e)
return t2()
}).then((e)=>{
console.log(e)
});
</script>