Skip to content

Commit 2a17f01

Browse files
committed
Spelling
Fixed some more minor spelling errors
1 parent c97f535 commit 2a17f01

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

6-async/02-promise-basics/article.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ When the executor finishes the job, it should call one of:
3434
- `resolve(value)` -- to indicate that the job finished successfully:
3535
- sets `state` to `"fulfilled"`,
3636
- sets `result` to `value`.
37-
- `reject(error)` -- to indicate that an error occured:
37+
- `reject(error)` -- to indicate that an error occurred:
3838
- sets `state` to `"rejected"`,
3939
- sets `result` to `error`.
4040

@@ -128,7 +128,7 @@ The syntax of `.then` is:
128128
129129
```js
130130
promise.then(
131-
function(result) { /* handle a sucessful result */ },
131+
function(result) { /* handle a successful result */ },
132132
function(error) { /* handle an error */ }
133133
);
134134
```

6-async/03-promise-chaining/article.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ class Thenable {
207207
}
208208
then(resolve, reject) {
209209
alert(resolve); // function() { native code }
210-
// resolve with this.num*2 after the 1 secound
210+
// resolve with this.num*2 after the 1 second
211211
setTimeout(() => resolve(this.num * 2), 1000); // (**)
212212
}
213213
}
@@ -513,7 +513,7 @@ new Promise(function(resolve, reject) {
513513
/* never runs here */
514514
}).catch(error => { // (**)
515515

516-
alert(`The unknown error has occured: ${error}`);
516+
alert(`The unknown error has occurred: ${error}`);
517517
// don't return anything => execution goes the normal way
518518

519519
});

6-async/05-async-await/article.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,4 +295,4 @@ The `await` keyword before a promise makes JavaScript wait until that promise se
295295
296296
Together they provide a great framework to write asynchronous code that is easy both to read and write.
297297
298-
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.
298+
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.

0 commit comments

Comments
 (0)