Skip to content

VitalyPasechnik/js_fetch_data_advanced_DOM

 
 

Repository files navigation

  1. Replace <your_account> with your Github username in the link
  2. 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.

Task: Fetch data (advanced)

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 and resolves 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 and resolves 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 and all-successful which contain list of phones;
  • Each
    element should have

    headings with First Received or All Successful text;

  • All IDs and names of phones should be inside of
  • elements.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • SCSS 49.2%
  • JavaScript 34.7%
  • HTML 16.1%