Skip to content

Commit 2798cf6

Browse files
authored
Merge pull request #164 from cat2koban/fix-typo
fixed wrong function name
2 parents 607752a + ec97eaa commit 2798cf6

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • 1-js/11-async/08-async-await/01-rewrite-async

1-js/11-async/08-async-await/01-rewrite-async/solution.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ loadJson('no-such-user.json')
1919

2020
補足:
2121

22-
1. 関数 `loadUrl``async` になります。
22+
1. 関数 `loadJson``async` になります。
2323
2. すべての内側の `.then``await` に置き換えられます。
2424
3. 次のように、await するのではなく、`response.json()` を返すこともできます。:
2525

@@ -29,5 +29,5 @@ loadJson('no-such-user.json')
2929
}
3030
```
3131

32-
そうすると、外側のコードはその promise を解決するために `await` する必要があります。
32+
そうすると、外側のコードはその promise を解決するために `await` する必要があります。
3333
4. `loadJson` からスローされたエラーは `.catch` で処理されます。そこでは `await loadJson(…)` を使うことができません。なぜなら `async` 関数の中ではないからです。

0 commit comments

Comments
 (0)