Why does JavaScript's `Promise.all` not run all promises in failure conditions?
问题 According to MDN: If any of the passed in promises rejects, the all Promise immediately rejects with the value of the promise that rejected, discarding all the other promises whether or not they have resolved. The ES6 spec seems to confirm this. My question is: Why does Promise.all discard promises if any of them reject, since I would expect it to wait for "all" promises to settle , and what exactly does "discard" mean? (It's hard to tell what "discard" means for in-flight promises vs.