when I try to loop some functions it get stuck on the randomvariable() , how can the random number work on loop without I need to refresh the page everytime
function randomvariable () {
randomvariable = Math.floor(Math.random() * 21);
document.getElementById("demo").innerHTML = randomvariable; }
function launchfunctions() {
var count = 0;
while (count < 10) {
randomvariable();
count++;
}
}
Aucun commentaire:
Enregistrer un commentaire