Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
- What is a Promise? 3:36
- Create a Promise 4:43
- Reject a Promise and Handle Errors 3:25
- Promises Review
- Create a Promise Review 6 questions
- From Callbacks to Promises 5:59
- Handle Multiple Promises with Promise.all 3:35
- Before You Continue
- Perform Cleanup With finally() 2:47
- Using Fetch 6:21
- JavaScript Promises Review 6 questions
Well done!
You have completed Asynchronous Programming with JavaScript!

- 2x 2x
- 1.75x 1.75x
- 1.5x 1.5x
- 1.25x 1.25x
- 1.1x 1.1x
- 1x 1x
- 0.75x 0.75x
- 0.5x 0.5x
If an error occurs, the promise status changes from "pending" to a "rejected" (or failed) state. Promises give you the opportunity to handle the error with a method called catch()
.
Running a JavaScript file with the node
command
If you are not able to run the file promises-breakfast.js
in your Terminal or console using the command node promises-breakfast.js
, you can link the file to index.html
and then test the output in your browser's console:
<body>
...
<script src="js/promises-breakfast.js"></script>
<script src="js/callbacks.js"></script>
</body>
Resources
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up-
Samuel Kleos
Front End Web Development Techdegree Student 13,728 Points1 Answer
-
Marni Ali
4,642 Points2 Answers
-
Daniel Ahn
Front End Web Development Techdegree Student 8,575 Points0 Answers
-
Daniel Ahn
Front End Web Development Techdegree Student 8,575 Points0 Answers
-
Sadaf Partovi
Front End Web Development Techdegree Graduate 14,594 Points1 Answer
-
Janelle Mackenzie
7,510 Points2 Answers
-
PLUS
Mohammed Zeeshan
Courses Plus Student 3,611 Points1 Answer
-
Bernardo Hauer Santos
8,767 Points1 Answer
-
vamosrope14
14,932 Points2 Answers
View all discussions for this video
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up