I am working with 5 divs that have the id of "correctAnswer". In my array, I have 5 elements. How can I insert these 5 elements into the 5 divs? Here is the approach I am taking.
var answers =["David Bowie","AM","Australia","Boneface","Sound City"];
for (i=1; i<=numQues; i++) {
document.getElementById("correctAnswer").innerHTML="correctanswer:"+answers[i-1];
}
<div id="correctAnswer"></div>
</div>