dice roll Tinker Task
by nathanesa
JavaScript
var noOfSides = prompt("How many sides should the die have?")
var dieRoll = Math.floor(Math.random() * noOfSides + 1);
document.write('roll: ' + dieRoll);
by nathanesa
var noOfSides = prompt("How many sides should the die have?")
var dieRoll = Math.floor(Math.random() * noOfSides + 1);
document.write('roll: ' + dieRoll);