I am trying to calculate the random numbers roll of the dice in a loop till a double is rolled. Nothing happening when I load the page. Here is my code.
var roll1 = randomInteger(1,6);
var roll2 = randomInteger(1,6);
while(roll1 != roll2){
var roll1 = randomInteger(1,6);
var roll2 = randomInteger(1,6);
document.write(+roll1+ " - " +roll2+ );
}
document.write("<br><br><b>Doubles obtained" );
Aucun commentaire:
Enregistrer un commentaire