exports.diceroller = function(min, max){ return Math.floor(Math.random() * (max - min) + min); }
In order to make the function work, you have to input the minimum and the maximum number. For a six faced dice the min and max values are 1 and 7.
exports.diceroller = function(min, max){ return Math.floor(Math.random() * (max - min) + min); }
In order to make the function work, you have to input the minimum and the maximum number. For a six faced dice the min and max values are 1 and 7.
npm i dice-exercise
1
1.0.3
MIT
708 B
3