function a(){ setTimeout(() => { console.log(2000) }, 2000); } function b(){ setTimeout(() => { console.log(1000) }, 1000); } async function ab(){ await a() await b() } ab()