SHARE
TWEET

Untitled

a guest Oct 20th, 2019 97 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ASYNC AWAIT
  2. Review
  3. Awesome work getting the hang of the async...await syntax! Let’s review what you’ve learned:
  4.  
  5. async...await is syntactic sugar built on native JavaScript promises and generators.
  6. We declare an async function with the keyword async.
  7. Inside an async function we use the await operator to pause execution of our function until an asynchronous action completes and the awaited promise is no longer pending .
  8. await returns the resolved value of the awaited promise.
  9. We can write multiple await statements to produce code that reads like synchronous code.
  10. We use try...catch statements within our async functions for error handling.
  11. We should still take advantage of concurrency by writing async functions that allow asynchronous actions to happen in concurrently whenever possible.
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