回答編集履歴
1
調整
test
CHANGED
@@ -13,3 +13,39 @@
|
|
13
13
|
console.log(res);
|
14
14
|
|
15
15
|
```
|
16
|
+
|
17
|
+
# 調整
|
18
|
+
|
19
|
+
```javascript
|
20
|
+
|
21
|
+
var originalArr = [['有馬', '2019/9/1'], ['浜田', '2019/6/3'], ['佐藤', '2019/4/4']];
|
22
|
+
|
23
|
+
var newArr = [['浜田', '2019/6/3'], ['鈴木', '2018/2/12']];
|
24
|
+
|
25
|
+
var originalArr2 = [];
|
26
|
+
|
27
|
+
for(i=0;i<originalArr.length;i++){
|
28
|
+
|
29
|
+
originalArr2.push(originalArr[i][0]+","+originalArr[i][1]);
|
30
|
+
|
31
|
+
}
|
32
|
+
|
33
|
+
var newArr2 =[];
|
34
|
+
|
35
|
+
for(i=0;i<newArr.length;i++){
|
36
|
+
|
37
|
+
newArr2.push(newArr[i][0]+","+newArr[i][1]);
|
38
|
+
|
39
|
+
}
|
40
|
+
|
41
|
+
var res=[];
|
42
|
+
|
43
|
+
for(i=0;i<newArr2.length;i++){
|
44
|
+
|
45
|
+
if(originalArr2.indexOf(newArr2[i])==-1) res.push(newArr[i]);
|
46
|
+
|
47
|
+
}
|
48
|
+
|
49
|
+
console.log(res);
|
50
|
+
|
51
|
+
```
|