Skip to content
JS

JavaScript Promises in Depth

Course on egghead by Marius Schulz

View on egghead (opens in a new tab)
1 h 7 min
LengthVideo runtime
Subscription
Price modelegghead plan
13
Lessons
4.7
Rating out of 572 ratings on egghead
Dec 2018
Published7 Dec 2018

About this course

Description from egghead

ES2015 brought a native Promise to the JavaScript standard library. In this course, we’re going to take an in-depth look at how to use promises to model various kinds of asynchronous operations. First, we’re going to explore how to create promises using the Promise constructor or the Promise.resolve() or Promise.reject() methods. Then, we’re going to see how to chain promises together using .then(), .catch(), and .finally(). We’re going to compare various error handling strategies along the way. We’re going to wrap up this course by taking a look at how to deal with multiple promises using Promise.all() and Promise.race() and how to await a promise using the await operator.

What it covers

13 lessons
  1. 1Introduction to JavaScript Promises in Depth
  2. 2Create a Promise Chain in JavaScript with Promise.prototype.then()
  3. 3Catch Errors in a JavaScript Promise Chain with Promise.prototype.catch()
  4. 4Execute Cleanup Logic in a JavaScript Promise Chain with Promise.prototype.finally()
  5. 5Create a Rejected Promise in JavaScript with Promise.reject()
  6. 6Create a Resolved Promise in JavaScript with Promise.resolve()
  7. 7Create a New Promise in JavaScript with the Promise Constructor
  8. 8Convert a Callback-Based JavaScript Function to a Promise-Based One
  9. 9Wait for the Fastest JavaScript Promise to Settle with Promise.race()
  10. 10Wait for Multiple JavaScript Promises to Be Fulfilled with Promise.all()
  11. 11Wait for Multiple JavaScript Promises to Settle with Promise.allSettled()
  12. 12Wait for the Fastest JavaScript Promise to Be Fulfilled with Promise.any()
  13. 13Await a JavaScript Promise in an async Function with the await Operator

Similar JavaScript courses

  1. Understand JavaScript Arrays

    egghead · Shane Osbourne · 11 lessons · 4.7 from 53 ratings · Apr 2016

    1 h 10 minSubscription
    egghead114.7 (53)Apr 2016
  2. GIF Loop Coder for Creating Animation

    egghead · Keith Peters · 11 lessons · Jul 2016

    1 h 1 minSubscription
    egghead11Jul 2016
  3. Calculator Project: JavaScript

    Master.dev · Brian Holt · 14 lessons · Sept 2019

    1 h 14 minSubscription
    Master.dev14Sept 2019
  4. Beginner1 h
    CourseraOct 2020
  5. How to Deploy a Website

    Codecademy · 3 lessons · Apr 2018

    Beginner1 h
    Codecademy3Apr 2018
  6. Beginner1 h
    CourseraMay 2024
  7. Beginner1 h
    Codecademy2Nov 2018
  8. Learn jQuery: DOM Traversing

    Codecademy · 1 lessons · Jan 2023

    Intermediate1 h
    Codecademy1Jan 2023

A hyphen means the provider's catalogue does not state the value.

Same topic, nearest in length, up to three from any one provider.

Data read from the egghead catalogue on 28 Nov 2026. How the data is collected.

    Compare