回答編集履歴
4
テキスト修正
answer
CHANGED
@@ -1,5 +1,7 @@
|
|
1
|
-
こんにちは
|
1
|
+
こんにちは
|
2
2
|
|
3
|
+
`hoge()` がPromiseを返すのであれば、以下のようにすればよいかと思います。
|
4
|
+
|
3
5
|
```javascript
|
4
6
|
async function test() {
|
5
7
|
const response = await hoge()
|
3
テキスト修正
answer
CHANGED
@@ -13,4 +13,4 @@
|
|
13
13
|
console.log('これを表示させたくない')
|
14
14
|
}
|
15
15
|
```
|
16
|
-
- **動作確認用CodePen:** [https://codepen.io/jun68ykt/pen/poJwdeb?editors=
|
16
|
+
- **動作確認用CodePen:** [https://codepen.io/jun68ykt/pen/poJwdeb?editors=1111](https://codepen.io/jun68ykt/pen/poJwdeb?editors=1111)
|
2
テキスト修正
answer
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
```javascript
|
4
4
|
async function test() {
|
5
|
-
const response = await hoge()
|
5
|
+
const response = await hoge()
|
6
6
|
|
7
7
|
for (let i in response) {
|
8
8
|
if (response[i] === 'ううう') {
|
1
テキスト修正
answer
CHANGED
@@ -6,11 +6,11 @@
|
|
6
6
|
|
7
7
|
for (let i in response) {
|
8
8
|
if (response[i] === 'ううう') {
|
9
|
-
|
9
|
+
return
|
10
10
|
}
|
11
11
|
}
|
12
12
|
|
13
13
|
console.log('これを表示させたくない')
|
14
|
-
}
|
14
|
+
}
|
15
15
|
```
|
16
16
|
- **動作確認用CodePen:** [https://codepen.io/jun68ykt/pen/poJwdeb?editors=0012](https://codepen.io/jun68ykt/pen/poJwdeb?editors=0012)
|