📜  js 等到 2 个 promise 被解决 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:12.950000             🧑  作者: Mango

代码示例1
const promise1 = //...
const promise2 = //...
Promise.all([promise1, promise2]).then(data => {
    const dataFromPromise1 = data[0]
    const dataFromPromise2 = data[1]
})