This function simulates rolling 100 standard six-sided dice, generating an array of 100 random integers, each between 1 and 6.
function roll100Dice() {
var results = [];
for (var i = 0; i < 100; i++) {
var roll = Math.floor(Math.random() * 6) + 1;
results.push(roll);
}
return results;
}
This website uses cookies for essential functions, other functions, and for statistical purposes. Please refer to the cookie policy for details.