SHARE
TWEET

Untitled

a guest Oct 23rd, 2019 93 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Review Requests II
  2. Let’s recap on the concepts covered in the previous exercises:
  3.  
  4. GET and POST requests can be created a variety of ways.
  5.  
  6. Use AJAX to asynchronously request data from APIs. fetch() and async/await are new functionalities developed in ES6 (promises) and ES8 respectively.
  7.  
  8. Promises are a new type of JavaScript object that represent data that will eventually be returned from a request.
  9.  
  10. fetch() is a web API that can be used to create requests. fetch() will return promises.
  11.  
  12. We can chain .then() methods to handle promises returned by fetch().
  13.  
  14. The .json() method converts a returned promise to a JSON object.
  15.  
  16. async is a keyword that is used to create functions that will return promises.
  17.  
  18. await is a keyword that is used to tell a program to continue moving through the message queue while a promise resolves.
  19.  
  20. await can only be used within functions declared with async.
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top