Skip to content

Commit 924ec1e

Browse files
authored
Merge pull request #618 from tienpham94/patch-1
Minor docs fixes
2 parents fb3264a + a58223c commit 924ec1e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

6-async/04-promise-api/01-promise-errors-as-results/solution.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Promise.all(
1212

1313
Here we have an array of `fetch(...)` promises that goes to `Promise.all`.
1414

15-
We can't change the way `Promise.all` works: if it detects an error, then it rejects with it. So we need to prevent any error from occuring. Instead, if a `fetch` error happens, we need to treat it as a "normal" result.
15+
We can't change the way `Promise.all` works: if it detects an error, then it rejects with it. So we need to prevent any error from occurring. Instead, if a `fetch` error happens, we need to treat it as a "normal" result.
1616

1717
Here's how:
1818

7-network/1-xmlhttprequest/article.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ The modern [specification](https://xhr.spec.whatwg.org/#events) lists following
9797
- `loadstart` -- the request has started.
9898
- `progress` -- the browser received a data packet (can happen multiple times).
9999
- `abort` -- the request was aborted by `xhr.abort()`.
100-
- `error` -- an network error has occured, the request failed.
100+
- `error` -- an network error has occurred, the request failed.
101101
- `load` -- the request is successful, no errors.
102102
- `timeout` -- the request was canceled due to timeout (if the timeout is set).
103103
- `loadend` -- the request is done (with an error or without it)
@@ -143,7 +143,7 @@ Here's a more feature-full example, with errors and a timeout:
143143
Once the server has responded, we can receive the result in the following properties of the request object:
144144

145145
`status`
146-
: HTTP status code: `200`, `404`, `403` and so on. Also can be `0` if an error occured.
146+
: HTTP status code: `200`, `404`, `403` and so on. Also can be `0` if an error occurred.
147147

148148
`statusText`
149149
: HTTP status message: usually `OK` for `200`, `Not Found` for `404`, `Forbidden` for `403` and so on.
@@ -242,7 +242,7 @@ const unsigned short DONE = 4; // request complete
242242

243243
An `XMLHttpRequest` object travels them in the order `0` -> `1` -> `2` -> `3` -> ... -> `3` -> `4`. State `3` repeats every time a data packet is received over the network.
244244

245-
The example above demostrates these states. The server answers the request `digits` by sending a string of `1000` digits once per second.
245+
The example above demonstrates these states. The server answers the request `digits` by sending a string of `1000` digits once per second.
246246

247247
[codetabs src="readystate"]
248248

0 commit comments

Comments
 (0)