Basic JavaScript: Generate Random Whole Numbers within a Range question

Tell us what’s happening:

Can anybody tell me what I have done wrong

Your code so far

function randomRange(myMin, myMax) {
// Only change code below this line

return Math.floor(Math.random() * (myMax - myMin + 1));
// Only change code above this line

Your browser information:

User Agent is: Mozilla/5.0 (Linux; Android 9; LM-X420) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.79 Mobile Safari/537.36.

Challenge: Generate Random Whole Numbers within a Range

Link to the challenge:

You forgot one little term at the end of the formula:

Math.floor(Math.random() * (max - min + 1)) + min

If you pass 1 as min number and pass 5 as max number you will get a range from 0-4, but that is not what the challenge asks for. It says the output range should include min and max and the range between them. In order to fix it you should follow the code above that JeremyLT sent.