回答編集履歴
2
修正
test
CHANGED
@@ -6,6 +6,12 @@
|
|
6
6
|
|
7
7
|
const obj3=Object.keys(obj2).reduce((x,y)=>(x[y]=obj1[y],x),{});
|
8
8
|
|
9
|
+
これでもいけます
|
10
|
+
|
11
|
+
const obj3=Object.keys(obj2).reduce((x,y)=>Object.defineProperty(x,y,{enumerable:true,value:obj1[y]}),{});
|
12
|
+
|
13
|
+
|
14
|
+
|
9
15
|
|
10
16
|
|
11
17
|
```
|
1
ちょうせい
test
CHANGED
@@ -4,6 +4,8 @@
|
|
4
4
|
|
5
5
|
もしくは
|
6
6
|
|
7
|
-
const obj3=Object.keys(obj2).reduce((x,y)=>(x
|
7
|
+
const obj3=Object.keys(obj2).reduce((x,y)=>(x[y]=obj1[y],x),{});
|
8
|
+
|
9
|
+
|
8
10
|
|
9
11
|
```
|