I know the formula is correct and I’ve even tried console.log the function to verify that it passes all the test but the actual test won’t pass my solution. Is this bug in editor?
its showing error only for the 2nd test which is highest random number generated should ne equal to myMax.
Your code so far
function randomRange(myMin, myMax) {
// Only change code below this line
myMin =5;
myMax = 10;
return Math.floor(Math.random()*(myMax-myMin +1)) +myMin;
// Only change code above this line
}
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36
Challenge: Basic JavaScript - Generate Random Whole Numbers within a Range
Link to the challenge: