An open API service indexing awesome lists of open source software.

https://github.com/pagepro/promises-task


https://github.com/pagepro/promises-task

Last synced: 9 months ago
JSON representation

Awesome Lists containing this project

README

          

# Promise Excercise

## Useful links:

- http://blog.mediumequalsmessage.com/promise-deferred-objects-in-javascript-pt1-theory-and-semantics
- https://blog.domenic.me/youre-missing-the-point-of-promises/
- https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise
- http://jamesknelson.com/grokking-es6-promises-the-four-functions-you-need-to-avoid-callback-hell/

## Instruction:

- Get list of dog breeds from this API: https://dog.ceo/api/breeds/list
- Based on the list, prepare dropdown (select) with list of breeds.
- When user change dropdown option get the dog photo from API and display in `.js-result` div.

## Tips

- Use `fetch` method - this method returns a Promise.
- In `./fetch-example.js` file you have example of using fetch (this script doesn't work, it is just an example).
- You have some instructions in app.js file.

## Demo

![demo](demo.gif?raw=true "Demo")