Skip to content

Latest commit

 

History

History

promises

Promise examples

Demonstrates how Promises can be used to simplify async operations.

Watch: Introduction to Promises in JavaScript

Next, go through the examples in this order:

  1. simple callback (live demo)
  2. simple promise (live demo)
  3. serial callback (live demo)
  4. serial promise (condensed) (live demo)
  5. serial promise (live demo)
  6. parallel promise (live demo)
  7. fail (live demo)
  8. pipe (live demo)

Running locally

Browsers don't allow you to do requests to file:// URLs (for security reasons), so you need to create a local server to run them.

cd <this directory>
python -m SimpleHTTPServer
open http://localhost:8000/FILENAME.html