Attempting to generate a random integer between 1 and 6 using the 'random' library. Here's what I have coded so far:
import random from 'random'
function rollDice(min:number, max:number) {
return Math.floor(Math.random() * (max - min + 1) + min)
}
let result = rollDice(1,6)
console.log(result)
Struggling with correctly utilizing the 'random' function. Any assistance would be greatly appreciated!