From d738e311df81533cf42860e287ab42abfb296e34 Mon Sep 17 00:00:00 2001 From: Mohammed Zakaria Khan Date: Sun, 14 Aug 2022 19:06:45 +0200 Subject: [PATCH] Grammar correction --- 1-js/11-async/02-promise-basics/article.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/1-js/11-async/02-promise-basics/article.md b/1-js/11-async/02-promise-basics/article.md index fbb425d4..207fb2c8 100644 --- a/1-js/11-async/02-promise-basics/article.md +++ b/1-js/11-async/02-promise-basics/article.md @@ -36,7 +36,7 @@ So to summarize: the executor runs automatically and attempts to perform a job. The `promise` object returned by the `new Promise` constructor has these internal properties: - `state` — initially `"pending"`, then changes to either `"fulfilled"` when `resolve` is called or `"rejected"` when `reject` is called. -- `result` — initially `undefined`, then changes to `value` when `resolve(value)` called or `error` when `reject(error)` is called. +- `result` — initially `undefined`, then changes to `value` when `resolve(value)` is called or `error` when `reject(error)` is called. So the executor eventually moves `promise` to one of these states: @@ -281,7 +281,7 @@ To summarize: - If a `finally` handler returns something, it's ignored. - When `finally` throws an error, then the execution goes to the nearest error handler. -These features are helpful and make things work just the right way if we `finally` how it's supposed to be used: for generic cleanup procedures. +These features are helpful and make things work just the right way if we use `finally` how it's supposed to be used: for generic cleanup procedures. ````smart header="We can attach handlers to settled promises" If a promise is pending, `.then/catch/finally` handlers wait for its outcome.