From 07319c719c5cb87f43363948d27d0994f58fb330 Mon Sep 17 00:00:00 2001 From: Ilya Kantor Date: Mon, 2 Sep 2019 21:50:44 +0300 Subject: [PATCH] minor --- 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 8106cf74..503c22dc 100644 --- a/1-js/11-async/02-promise-basics/article.md +++ b/1-js/11-async/02-promise-basics/article.md @@ -44,7 +44,7 @@ So the executor eventually moves `promise` to one of these states: Later we'll see how "fans" can subscribe to these changes. -Here's an example of a Promise constructor and a simple executor function with delayed "producing code" (via `setTimeout`): +Here's an example of a promise constructor and a simple executor function with "producing code" that takes time (via `setTimeout`): ```js run let promise = new Promise(function(resolve, reject) { @@ -57,7 +57,7 @@ let promise = new Promise(function(resolve, reject) { We can see two things by running the code above: -1. The executor is called automatically and immediately (by the `new Promise`). +1. The executor is called automatically and immediately (by `new Promise`). 2. The executor receives two arguments: `resolve` and `reject` — these functions are pre-defined by the JavaScript engine. So we don't need to create them. We only should call one of them when ready. After one second of "processing" the executor calls `resolve("done")` to produce the result: