1 min readOct 29, 2019
this is misleading,
there is no way you can make asynchronous code run synchronously
Proof:
async function abc(){
console.log(1)
Promise.resolve(2).then(console.log)
console.log(3)
await Promise.resolve(4).then(console.log)
console.log(5)
}
console.log(0)
abc()
console.log(6)
output:
0
1
3
6
2
4
5