I would like my program to return 10 random numbers but it isn't working it doesn't load the random numbers, I have linked the program to index.html so that's not the problem here, this is what I have tried:
function randomNumber(upper) {
return Math.floor(Math.random() * upper) + 1;
}
var counter = 0;
while (counter < 10) {
var randNum = randomNumber(6);
document.write(randNum + ' ');
counter += 1;
}
onload?