When I run the program I'm not getting any output or errors for that matter. Program is simple I have to generate 7 seven random numbers between 0-9 and store their value in an array then for each number in the array I have to use a for loop to output each value.
var motto = [];
var randomNum = Math.floor(Math.random()*10);
for (i = 0; i < 7; i++) {
motto.pop(randomNum);
}
for (i = 0; i < motto.length; i++) {
document.write(motto[i] + "<br>");
}
Aucun commentaire:
Enregistrer un commentaire