Skip to content

SrimalPriyanga/js-promises-and-async-recap

Repository files navigation

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Promises & Async</title>
  </head>
  <body>
    <h3>Promises & Async</h3>
    <ul>
      <li>
        States
        <ul>
          <li>Pending</li>
          <li>Fulfilled</li>
          <li>Rejected</li>
          <li>
            *Settled / Resolved > either in Fulfilled or Rejected state no
            longer Pending
          </li>
        </ul>
      </li>
      <li>Readable asychronous code</li>
      <li>Promises are NOT lazy</li>
      <li>Promises return Promises - Chaining</li>
      <li>
        Consuming
        <ul>
          <li>get</li>
          <li>getCatch</li>
          <li>chain</li>
          <li>chainCatch</li>
          <li>final</li>
        </ul>
      </li>
      <li>
        Creating
        <ul>
          <li>timeout</li>
          <li>interval</li>
          <li>clearIntervalChain</li>
          <li>xhr</li>
          <li>allPromises</li>
          <li>allSettled</li>
          <li>race</li>
        </ul>
      </li>
      <li>
        Async/Await is syntatic suger
        <ul>
          <li>async - return value is wrapped in a promise</li>
          <li>await - must be used inside of async</li>
          <li>await - only bloks current function</li>
        </ul>
      </li>
      <li>
        iterating
        <ul>
          <li>get</li>
          <li>getCatch</li>
          <li>chain</li>
          <li>concurrent</li>
          <li>parallel</li>
        </ul>
      </li>
    </ul>

    <script>
      "use strict";


    </script>
  </body>
</html>

About

js-promises-and-async-recap

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published