Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

5
  • This seems to be the same pattern as in the nesting (and) closures answer Commented Aug 27, 2019 at 21:24
  • It does look similar. I've since learned that the new Async/Await syntax includes automatic binding of arguments, so all the arguments are available to all the asynchronous functions. I'm abandoning Promises. Commented Aug 28, 2019 at 0:04
  • async/await still means using promises. What you might abandon is then calls with callbacks. Commented Aug 28, 2019 at 1:04
  • is it just me, or is manually manipulating scope about 10x more primitive than manual memory management? why the heck is this necessary? it looks awful. Commented Oct 3, 2020 at 21:45
  • It is actually quite clean to do things after an asynchronous operation like this: promise.then1.then2.then3.catch . And while you can only pass one value from one part of this chain to the next part, that value can be an array or object containing any number of subvalues! And it's even more natural if you use "async" functions, because await can be used to "wait" for each asynchronous operation to complete, without any promise chains! So asynchronous programming can be very elegant and compact. Commented Oct 4, 2020 at 22:23