Skip to content

Instantly share code, notes, and snippets.

@t-laird
Last active January 16, 2018 20:12
Show Gist options
  • Save t-laird/1cc27e593d9edd46f10e07d947bbb0ff to your computer and use it in GitHub Desktop.
Save t-laird/1cc27e593d9edd46f10e07d947bbb0ff to your computer and use it in GitHub Desktop.

Thomas Laird - Mod 4 Prework

Promises Practice Problems: Promises Practice

Questions:

  1. .then is used to handle the next action after a promise is resolved. .catch will fire as a result of a promise in the chain rejecting or erroring.
  2. Promises are useful when for handling asynchronous actions, especially when several asynchronous actions are chained together. The .then and .catch attached methods help with appropriately handling for successfully resolved or rejected promises. Other
  3. There are a number of libraries that extend upon the default functionality provided to promises like bluebird and promisfy. Other libraries like jQuery and React make use of promises in various places to handle asynchronous actions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment