General grammar/typo changes

This commit is contained in:
Eli Geller 2019-04-09 12:41:07 -04:00
parent 0789e3833d
commit 16deb3c6c1
10 changed files with 32 additions and 32 deletions

View file

@ -20,13 +20,13 @@ Promise.all(urls.map(url => fetch(url)))
});
```
The problem is that if any of requests fails, then `Promise.all` rejects with the error, and we lose results of all the other requests.
The problem is that if any of requests fails, then `Promise.all` rejects with the error, and we lose the results of all the other requests.
That's not good.
Modify the code so that the array `responses` in the line `(*)` would include the response objects for successful fetches and error objects for failed ones.
For instance, if one of URLs is bad, then it should be like:
For instance, if one of the URLs is bad, then it should be like:
```js
let urls = [