- Joined
- Nov 23, 2019
- Messages
- 72
- Reaction score
- 1
var scores = [24, 45, 67];
var arrayLength = scores.length;
var roundNumber = 0;
var msg ' ';
var i;
for (i = 0; i < arrayLength; i++) {
roundNumber = (i + 1);
msg = 'Round ' + roundNumber + ': ';
msg += scores + '<br /> ';
}
document.getElementById('answer').innerHTML = msg;
I could not find the failure.(note: I placed <div id="answer"> </div> in html document but still does not work)
var arrayLength = scores.length;
var roundNumber = 0;
var msg ' ';
var i;
for (i = 0; i < arrayLength; i++) {
roundNumber = (i + 1);
msg = 'Round ' + roundNumber + ': ';
msg += scores + '<br /> ';
}
document.getElementById('answer').innerHTML = msg;
I could not find the failure.(note: I placed <div id="answer"> </div> in html document but still does not work)