Reading this post and your previous one, I got the understanding that async/await is simply a way…
Dominic Mayers
2

I know it’s an old comment, but it’s up at the top so let me clear the confusion. Consider this piece of code:

async function test() {
await Promise.resolve().then(() => {
while (1) {};
});
}
console.log('before infinite test()');
test();
console.log('after infinite test()');

If what you say is true then you will never see the second console.log (it waits for the infinite loop to finish). Now run this code and see for yourself. async/await ≠ synchronous calls.

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.