mirror of https://github.com/01-edu/public.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
601 B
601 B
Race
Instructions
Create two functions:
race
: that works likePromise.race
.some
: that takes anarray
of promises or values, andcount
number. It should return the firstcount
resolved values. Empty arrays or acount
of 0 return a promise resolving toundefined
.
Code provided
The provided code will be added to your solution, and does not need to be submitted.
Promise.race = undefined