回答編集履歴
1
調整
answer
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
var keyArray = ["赤","青","黄"]
|
4
4
|
var singou = {}
|
5
5
|
keyArray.forEach(function(value,index){
|
6
|
-
Object.defineProperty(singou, value, {value:index,enumerable:true});
|
6
|
+
Object.defineProperty(singou, value, {value:index+1,enumerable:true});
|
7
7
|
});
|
8
8
|
console.log(singou);
|
9
9
|
```
|