2 ms·
> in my experience, "async" allows you to write the code linearly, but now the code is executed out of order Nope, the code is executed in order. That's what `
by yawaramin 7y ago
> in my experience, "async" allows you to write the code linearly, but now the code is executed out of order
Nope, the code is executed in order. That's what `await` accomplishes. Wherever you use `await` you have a guarantee that anything that comes after it will only execute when the promise that was awaited, has resolved.