From cae000f4ee7c57f52f4e0c00d6cf7885d2c84c21 Mon Sep 17 00:00:00 2001 From: Peter Roche <46547072+paroche@users.noreply.github.com> Date: Wed, 22 Jan 2020 23:08:01 -0700 Subject: [PATCH] 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-js/11-async/02-promise-basics/article.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1-js/11-async/02-promise-basics/article.md b/1-js/11-async/02-promise-basics/article.md index 8017264a..8909df9b 100644 --- a/1-js/11-async/02-promise-basics/article.md +++ b/1-js/11-async/02-promise-basics/article.md @@ -26,7 +26,7 @@ The function passed to `new Promise` is called the *executor*. When `new Promise Its arguments `resolve` and `reject` are callbacks provided by JavaScript itself. Our code is only inside the executor. -When the executor obtains the result, be it soon or late - doesn't matter, it should call one of these callbacks: +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.