📜  promise.race polyfill - Javascript 代码示例

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

代码示例1
Promise.myRace = function (promises) {
    return new Promise((resolve, reject) => {
      promises.forEach((promise) => {
        promise.then(resolve, reject)
    })
  })
}