/** 异步函数的执行顺序 记录一下*/async function yibu(){
console.log('first')
setTimeout(() => {
console.log('third')
}, 1);
}
function tongbu(){
console.log('second')
}
yibu()
tongbu()
/**
* first -> second -> third
*/
console.log('first')
setTimeout(() => {
console.log('third')
}, 1);
}
function tongbu(){
console.log('second')
}
yibu()
tongbu()
/**
* first -> second -> third
*/
展开
评论
点赞