0

async function b(a) {
  await a();
  console.log('b finished');
}

function a() {
  setTimeout(() => {
    console.log('a called')
  }, 1000)
}

async function exe() {
  await b(a);
}

exe();
// how to implement, provided 'a called' should displayed first and then 'b finished'?

0 Answers0