回答編集履歴
1
&& obj はよくみたら不要
test
CHANGED
@@ -16,6 +16,6 @@
|
|
16
16
|
|
17
17
|
const st = new Set();
|
18
18
|
objA.forEach(obj => st.add(obj.age));
|
19
|
-
const ret = objB.filter(obj => st.has(obj.age)
|
19
|
+
const ret = objB.filter(obj => st.has(obj.age));
|
20
20
|
console.log(ret);
|
21
21
|
```
|