回答編集履歴
1
findIndex
test
CHANGED
@@ -10,4 +10,26 @@
|
|
10
10
|
|
11
11
|
|
12
12
|
|
13
|
+
**(2018/4/28 13:14追記)**
|
14
|
+
|
15
|
+
index値が欲しいのなら、kei344 さんの回答通り、findIndexを利用して下さい。
|
16
|
+
|
17
|
+
|
18
|
+
|
19
|
+
- [Array.prototype.findIndex() - JavaScript | MDN](https://developer.mozilla.org/ja/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex)
|
20
|
+
|
21
|
+
|
22
|
+
|
23
|
+
複数のindex値が欲しいのなら、自作を。
|
24
|
+
|
25
|
+
|
26
|
+
|
27
|
+
- [JavaScript - 二次元配列で、特定Keyに対するValueが重複しているものを、1つ残して重複を無くすのではなく全部削除したい(39930)|teratail](https://teratail.com/questions/39930)
|
28
|
+
|
29
|
+
|
30
|
+
|
31
|
+
`Array.prototype.reduce` を使うのも有りですね。
|
32
|
+
|
33
|
+
|
34
|
+
|
13
35
|
Re: MarkAndrews さん
|