From 2a17f01575fefcb93975ce6fc9be0be621d7fcab Mon Sep 17 00:00:00 2001 From: reigningmetal Date: Tue, 13 Jun 2017 23:29:26 -0400 Subject: [PATCH] Spelling Fixed some more minor spelling errors --- 6-async/02-promise-basics/article.md | 4 ++-- 6-async/03-promise-chaining/article.md | 4 ++-- 6-async/05-async-await/article.md | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/6-async/02-promise-basics/article.md b/6-async/02-promise-basics/article.md index 6bf1d67b..a8f072a8 100644 --- a/6-async/02-promise-basics/article.md +++ b/6-async/02-promise-basics/article.md @@ -34,7 +34,7 @@ When the executor finishes the job, it should call one of: - `resolve(value)` -- to indicate that the job finished successfully: - sets `state` to `"fulfilled"`, - sets `result` to `value`. -- `reject(error)` -- to indicate that an error occured: +- `reject(error)` -- to indicate that an error occurred: - sets `state` to `"rejected"`, - sets `result` to `error`. @@ -128,7 +128,7 @@ The syntax of `.then` is: ```js promise.then( - function(result) { /* handle a sucessful result */ }, + function(result) { /* handle a successful result */ }, function(error) { /* handle an error */ } ); ``` diff --git a/6-async/03-promise-chaining/article.md b/6-async/03-promise-chaining/article.md index a9d21f59..41acc387 100644 --- a/6-async/03-promise-chaining/article.md +++ b/6-async/03-promise-chaining/article.md @@ -207,7 +207,7 @@ class Thenable { } then(resolve, reject) { alert(resolve); // function() { native code } - // resolve with this.num*2 after the 1 secound + // resolve with this.num*2 after the 1 second setTimeout(() => resolve(this.num * 2), 1000); // (**) } } @@ -513,7 +513,7 @@ new Promise(function(resolve, reject) { /* never runs here */ }).catch(error => { // (**) - alert(`The unknown error has occured: ${error}`); + alert(`The unknown error has occurred: ${error}`); // don't return anything => execution goes the normal way }); diff --git a/6-async/05-async-await/article.md b/6-async/05-async-await/article.md index aef4a073..6f20baca 100644 --- a/6-async/05-async-await/article.md +++ b/6-async/05-async-await/article.md @@ -295,4 +295,4 @@ The `await` keyword before a promise makes JavaScript wait until that promise se Together they provide a great framework to write asynchronous code that is easy both to read and write. -With `async/await` we rarely need to write `promise.then/catch`, but we still shouldn't forget that they are based on promises, because sometimes (e.g. in the outmost scope) we have to use these methods. Also `Promise.all` is a nice thing to wait for many tasks simultaneously. +With `async/await` we rarely need to write `promise.then/catch`, but we still shouldn't forget that they are based on promises, because sometimes (e.g. in the outermost scope) we have to use these methods. Also `Promise.all` is a nice thing to wait for many tasks simultaneously.