comment-value icon indicating copy to clipboard operation
comment-value copied to clipboard

Handle promises better

Open bahmutov opened this issue 8 years ago • 1 comments

For example

const promises = [Promise.resolve(20), Promise.resolve(30)]
// promises: [{},{}]
Promise.all(promises)
  .then(console.log)

should produce

const promises = [Promise.resolve(20), Promise.resolve(30)]
// promises: [Promise(20), Promise(30)]

bahmutov avatar Feb 14 '17 05:02 bahmutov

Hmm, does this mean that we need to collect all variable promises and wait for them after the end of the execution?

bahmutov avatar Feb 14 '17 05:02 bahmutov