- Replace
<your_account>
with your Github username in the link - Follow this instructions
- Run
npm run test
command to test your code; - Run
npm run test:only -- -n
to run fast test ignoring linter; - Run
npm run test:only -- -l
to run fast test with additional info in console ignoring linter.
- Run
API Url:
The main goal of this task is an advanced using of Promises.
Create next functions:
getFirstReceivedDetails
which takes array of phone's ID andresolves
with the first received detail (the fastest response NOT the first in the list). Ignore the other responses;getAllSuccessfulDetails
which takes array of phones' IDs andresolves
with an array of all successfully received details (errors should be ignored).
(optional) getThreeFastestDetails
which takes array of phones IDs and resolves
with an array of the details for the first 3 responses (the fastest).
Hints:
- You have to use DOM to notify users about resolved or rejected promises;
- Create elements with classes
first-received
andall-successful
which contain list of phones; - Each
- All IDs and names of phones should be inside of
- elements.