Unsettled Promises
Learn how unsettled promises are created and executor errors are caught.
We'll cover the following...
Creating unsettled promises
New promises are created using the Promise constructor. This constructor accepts a single argument: a function called the executor, which contains the code to initialize the promise. The executor is passed two functions, resolve() and reject(), as arguments. When the executor has successfully finished, we call the resolve() function to signal that the promise is resolved, or ...