Acid Coder
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

--

--

Acid Coder

Typescript Zombie. Youtube Pikachu On Acid. (Unrelated to programming but by watching it you become a good developer overnight)