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:
- simple callback (live demo)
- simple promise (live demo)
- serial callback (live demo)
- serial promise (condensed) (live demo)
- serial promise (live demo)
- parallel promise (live demo)
- fail (live demo)
- pipe (live demo)
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