-1
如何迭代每個科學對象/數組的第一個元素(問題)?我使用「science.question」,這是行不通的。 ```如何選擇對象中的數組的第一個孩子?
var scienceQuestion = {
scienceQue: function(){
for (var i = 0; i <science.question.length; i++)
science.question = questionsDiv.innerHtml
},
science: [
{ question: "What size is",
choices: [10,44,15],
correctIndex: 1
},
{ question: "???",
choices: [0,1,2],
correctIndex: 2
}
]
}
```