elkhayate / js_fetch_data_DOM

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

  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

API Urls:

The main goal of this task is practice of fetching data from API. Your task is create function getPhones that should resolve with the list of phones or reject in 5 second.

After receiving list of phones get all IDs and fetch all details for these phone ids with function getPhonesDetails, which takes array of IDs. getPhonesDetails should resolve with an array of details of each phone in the list or reject on any error.

Show phone names using the DOM.

(optional) Combine all data. Make array phonesWithDetails.

About

License:GNU General Public License v3.0


Languages

Language:JavaScript 76.4%Language:SCSS 12.3%Language:HTML 11.3%