Random Whole Number Doesn't Stay Within Range

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);

Hi
the method is Math.random() with parentheses , and you can try without +1.

ciao, true Math.random() need parentheses but the + 1 is correct

Hi
yes correct , I thought myMax is not include.