Am I able to switch this .forEach to a for loop? Curious if I could do the same thing with a for loop instead
choices.forEach((choice) => {
const number = choice.dataset['number'];
// This will populate the choices into the "choice-option" in the html
choice.innerText = currentQuestion['choice' + number];
});
// This removes the old question and adds a new one//
// .splice method on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/splice//
unusedQuestions.splice(questionIndex, 1);
acceptAnswers = true;
};
thanks!