0

It's possible to make JS synchronous inside of an async funciton with async/await.

async function manager(){
    console.log("Loading Assets!")
    await async1()
    await async2()
    ...(more awaited async code)
    console.log("Assets Loaded!")
}

Is it possible to do the same thing inside of the MAIN execution context, i.e. without putting into a function?

Dr. Chocolate
  • 2,043
  • 4
  • 25
  • 45

0 Answers0