8 lines
403 B
JavaScript
8 lines
403 B
JavaScript
//Generates semi random number between 1 and 6.
|
|
let a = Math.floor(Math.random() * 6) + 1;
|
|
|
|
document.getElementById("roll").onclick = function() {
|
|
document.getElementById("xLabel").innerHTML = Math.floor(Math.random() * 6) + 1;
|
|
document.getElementById("yLabel").innerHTML = Math.floor(Math.random() * 6) + 1;
|
|
document.getElementById("zLabel").innerHTML = Math.floor(Math.random() * 6) + 1;
|
|
} |