Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

promise.race polyfill

Promise.myRace = function (promises) {
	return new Promise((resolve, reject) => {
  	promises.forEach((promise) => {
    	promise.then(resolve, reject)
    })
  })
}
 
PREVIOUS NEXT
Tagged: #polyfill
ADD COMMENT
Topic
Name
1+5 =