From ec97eaa3e916d253d66798a3b8b31a46196c3f1a Mon Sep 17 00:00:00 2001 From: cat2koban Date: Fri, 14 Aug 2020 00:31:31 +0900 Subject: [PATCH] fixed wrong function name --- 1-js/11-async/08-async-await/01-rewrite-async/solution.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/1-js/11-async/08-async-await/01-rewrite-async/solution.md b/1-js/11-async/08-async-await/01-rewrite-async/solution.md index 506fe39e2d..4daab2935c 100644 --- a/1-js/11-async/08-async-await/01-rewrite-async/solution.md +++ b/1-js/11-async/08-async-await/01-rewrite-async/solution.md @@ -19,7 +19,7 @@ loadJson('no-such-user.json') 補足: -1. 関数 `loadUrl` は `async` になります。 +1. 関数 `loadJson` は `async` になります。 2. すべての内側の `.then` は `await` に置き換えられます。 3. 次のように、await するのではなく、`response.json()` を返すこともできます。: @@ -29,5 +29,5 @@ loadJson('no-such-user.json') } ``` - そうすると、外側のコードはその promise を解決するために `await` する必要があります。 + そうすると、外側のコードはその promise を解決するために `await` する必要があります。 4. `loadJson` からスローされたエラーは `.catch` で処理されます。そこでは `await loadJson(…)` を使うことができません。なぜなら `async` 関数の中ではないからです。