I’m having an issue with my code. It doesn’t give me a random whole number between 5 and 15. It just gives me a random number in general with no range.
function randomRange(myMin, myMax) {
return Math.floor(Math.random * (myMax - myMin + 1)) + myMin; // Change this line
}
// Change these values to test your function
var myRandom = randomRange(5, 15);
console.log(myRandom);