DEV Community

Discussion on: Async/Await and the forEach Pit of Despair

Collapse
 
thomasvl profile image
Thomas van Latum • Edited

By doing the for loop instead of the ForEach you just killed the whole purpose of doing the async code.
supposed axios(${baseURL}/users/${post.userId}) takes a couple of seconds to run...

Listen to your Toddler, he just wants to move fast and execute stuff as fast as possible!

You should just put the result in an array and sort the order out in the end.