function time() { return new Promise((resolve, rejcet) => { setTimeout(() => { resolve('111') }, 2000) }) } function time2() { return new Promise((resolve, rejcet) => { setTimeout(() => { resolve('222') }, 1000) }) } async function test(){ let res = await time() console.log(res) test1() console.log('bbb') } async function test1(){ // let res = await time2() console.log('aaa') } test()