Few grammatical corrections
Few grammatical corrections
This commit is contained in:
parent
7b76185892
commit
c06e21fee9
1 changed files with 3 additions and 3 deletions
|
@ -28,10 +28,10 @@ Its arguments `resolve` and `reject` are callbacks provided by JavaScript itself
|
|||
|
||||
When the executor obtains the result, be it soon or late, doesn't matter, it should call one of these callbacks:
|
||||
|
||||
- `resolve(value)` — if the job finished successfully, with result `value`.
|
||||
- `reject(error)` — if an error occurred, `error` is the error object.
|
||||
- `resolve(value)` — if the job is finished successfully, with result `value`.
|
||||
- `reject(error)` — if an error has occurred, `error` is the error object.
|
||||
|
||||
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 successful or `reject` if there was an error.
|
||||
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 successful or `reject` if there was an error.
|
||||
|
||||
The `promise` object returned by the `new Promise` constructor has these internal properties:
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue