We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 607752a + ec97eaa commit 2798cf6Copy full SHA for 2798cf6
1 file changed
1-js/11-async/08-async-await/01-rewrite-async/solution.md
@@ -19,7 +19,7 @@ loadJson('no-such-user.json')
19
20
補足:
21
22
-1. 関数 `loadUrl` は `async` になります。
+1. 関数 `loadJson` は `async` になります。
23
2. すべての内側の `.then` は `await` に置き換えられます。
24
3. 次のように、await するのではなく、`response.json()` を返すこともできます。:
25
@@ -29,5 +29,5 @@ loadJson('no-such-user.json')
29
}
30
```
31
32
- そうすると、外側のコードはその promise を解決するために `await` する必要があります。
+ そうすると、外側のコードはその promise を解決するために `await` する必要があります。
33
4. `loadJson` からスローされたエラーは `.catch` で処理されます。そこでは `await loadJson(…)` を使うことができません。なぜなら `async` 関数の中ではないからです。
0 commit comments