Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 0af25bc

Browse files
committed
minor fixes
1 parent de4247b commit 0af25bc

File tree

1 file changed

+2
-2
lines changed
  • 1-js/11-async/08-async-await/04-promise-all-failure

1 file changed

+2
-2
lines changed

‎1-js/11-async/08-async-await/04-promise-all-failure/task.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ async function run() {
5555
try {
5656
await Promise.all([
5757
// these 3 parallel jobs take different time: 100, 200 and 300 ms
58-
// we use delay helper for this effect
58+
// we use delay helper to achieve this effect
5959
*!*
6060
delay(() => database.query(true), 100),
6161
delay(() => database.query(false), 200),
@@ -72,7 +72,7 @@ async function run() {
7272
run();
7373
```
7474

75-
Two of these queries are (by chance) unsuccessful, but we handle it by wrapping the `Promise.all` call into a `try..catch` block.
75+
Two of these queries happen to be unsuccessful, but we're smart enough to wrap the `Promise.all` call into a `try..catch` block.
7676

7777
However, this doesn't help! This script actually leads to an uncaught error in console!
7878

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /