Update as per @paroche's comments

This commit is contained in:
Jonathan Chue 2020-01-02 12:36:56 -08:00 committed by GitHub
parent 4c650b54b7
commit 48261eb97e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -31,7 +31,7 @@ When the executor obtains the result, be it soon or late - doesn't matter, it sh
- `resolve(value)` — if the job finished successfully, with result `value`.
- `reject(error)` — if an error occurred, `error` is the error object.
So to summarize: the executor runs automatically. It performs a job and then calls either `resolve` or `reject`.
So to summarize: the executor runs automatically and attempts to perform a job. When it is finished with the attempt it calls `resolve` if it was succssful or `reject` if there was an error.
The `promise` object returned by the `new Promise` constructor has internal properties: