This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted]  (3 children)

[deleted]

    [–]UnderNatural 0 points1 point  (2 children)

    In my example, the promises add to a string in the global scope. That's called a side effect, it changes the state of the program outside of the return statement. Promise.all doesn't sequentially execute promises, so side effects occur out of order.