Skip to content

Commit d932e52

Browse files
committed
minor fixes
1 parent 0af25bc commit d932e52

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ Now here's the problem.
4242
We wrote the code to connect and send 3 queries in parallel (all of them take different time, e.g. 100, 200 and 300ms), then disconnect:
4343

4444
```js
45-
// Helper function to call async function fn after ms milliseconds
45+
// Helper function to call async function `fn` after `ms` milliseconds
4646
function delay(fn, ms) {
4747
return new Promise((resolve, reject) => {
4848
setTimeout(() => fn().then(resolve, reject), ms);
@@ -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 to achieve this effect
58+
// we use the `delay` helper to achieve this effect
5959
*!*
6060
delay(() => database.query(true), 100),
6161
delay(() => database.query(false), 200),

0 commit comments

Comments
 (0)