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
Hello.
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.