4 ms·
It's a massive improvement over callbacks when using an event loop model too. I've worked with code that has an insane amount of nesting because it was written
by ziml77 4y ago
It's a massive improvement over callbacks when using an event loop model too. I've worked with code that has an insane amount of nesting because it was written before async/await and instead had to pass in a callback every time it went off to do an asynchronous operation. It made the code very hard to read and it complicated exception handling, resource lifetime management, and even simply iterating over an input.
With async/await the code ends up structured the same as if the operations were synchronous. It's much easier to follow and modify.