Skip to content

Commit cae000f

Browse files
authored
Update article.md
Small punctuation change. Separately, I didn't change anything on this today, but note that line 34 above: "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." was, before it was changed recently, pretty much the same as line 82 above: "To summarize, the executor should perform a job (usually something that takes time) and then call `resolve` or `reject` to change the state of the corresponding promise object." So maybe some revision there is in order -- to not have both, or to change one or both. Not familiar enough with the article at this point to make the revision.
1 parent f186b7c commit cae000f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

1-js/11-async/02-promise-basics/article.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ The function passed to `new Promise` is called the *executor*. When `new Promise
2626

2727
Its arguments `resolve` and `reject` are callbacks provided by JavaScript itself. Our code is only inside the executor.
2828

29-
When the executor obtains the result, be it soon or late - doesn't matter, it should call one of these callbacks:
29+
When the executor obtains the result, be it soon or late, doesn't matter, it should call one of these callbacks:
3030

3131
- `resolve(value)` — if the job finished successfully, with result `value`.
3232
- `reject(error)` — if an error occurred, `error` is the error object.

0 commit comments

Comments
 (0)