回答編集履歴
1
nit
test
CHANGED
@@ -8,9 +8,11 @@
|
|
8
8
|
|
9
9
|
```javascript
|
10
10
|
|
11
|
-
|
11
|
+
// return を足す
|
12
12
|
|
13
|
+
console.log(test.findIndex((v) => {
|
14
|
+
|
13
|
-
return v.x===1 && v.y===3
|
15
|
+
return v.x === 1 && v.y === 3;
|
14
16
|
|
15
17
|
}));
|
16
18
|
|
@@ -20,9 +22,11 @@
|
|
20
22
|
|
21
23
|
```javascript
|
22
24
|
|
23
|
-
|
25
|
+
// {} を消す
|
24
26
|
|
27
|
+
console.log(test.findIndex((v) =>
|
28
|
+
|
25
|
-
v.x===1 && v.y===3
|
29
|
+
v.x === 1 && v.y === 3
|
26
30
|
|
27
31
|
));
|
28
32
|
|