I'm pretty new to programming in general so this may be a very basic question.
Also English isn't my native language, my appologies if I don't express myself very well.
const questions = [{
question: "what is 2 + 2 ?",
answer: [{
text: "4",
correct: true
}];
]
function showQuestion(question) {
questionElement.innerText = question.question
}
I'm having trouble understanding, how do we access the question property of the object questions ("what is 2 + 2 ?") without calling its object.property(questions.question)
but instead use parameter.property(question.question)
?