Generate random Whole Number within A Range Stress

Tell us what’s happening:

Someone please help me understand what I’m not doing correctly.

Your code so far


function randomRange(myMin, myMax) {

// Only change code below this line
function randomRange(myMin,myMax) {
  return Math.floor(Math.random() * (myMax - myMin + 1)) + myMin;
}
return 0;
// 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/80.0.3987.149 Safari/537.36.

Challenge: Generate Random Whole Numbers within a Range

Link to the challenge:

You created a new function inside of an existing function that returns zero. You only need to replace the return 0 line in the original code. I suggest resetting the code for the challenge and only changing the code between the comments. Don’t create a second function declaration.