Both of the Promise methods receive an array of promises, however, you’ll want to choose one over the other depending on what you need to accomplish.

Promise.all accepts an array of promises, and will attempt to fulfill all of them. Exits early if just 1 promise gets rejected.
全部完成。如果有一个reject则提前退出,成功则获得是[],失败则退出fail。如果想要[],则all。
Promise.race also accepts an array of promises, but returns the first promise that is settled. A settled promise can either be resolved or rejected.
第一个完成。返回第一个完成的。因为是竞赛race。如果想要Variable则race。



