Generate Random Whole Numbers

Generate Random Whole Numbers
0

#1

This the code
// Example
function ourRandomRange(ourMin, ourMax) {

return Math.floor(Math.random() * (ourMax - ourMin + 1)) + ourMin;
}

ourRandomRange(1, 9);

// Only change code below this line.

function randomRange(myMin, myMax) {

return 0; // Change this line

}

// Change these values to test your function
var myRandom = randomRange(5, 15);
I tried but i don’t know

https://www.freecodecamp.com/challenges/generate-random-whole-numbers-within-a-range#?solution=var%20min%20%3D%201%20%3B var%20max%20%3D%209%20%3B %2F%2F%20Example function%20ourFucntion(ourMin%2C%20ourMax)%20{ %20%20return%20Math.floor(Math.random()%20*%20(ourMax%20-%20ourMin%20%2B%201))%20%2B%20ourMin%3B%0A%7D%0A%0AourRandomRange(1%2C%209)%3B%0A%0A%2F%2F%20Only%20change%20code%20below%20this%20line.%0Avar%20min%20%3D10%3B%0Avar%20max%20%3D100%3B%0Afunction%20randomRange()%20%7B%0A%0A%20%20return%20Math.floor(Math.random()%20*%20(max%20-%20min%20%2B%201))%20%2B%20min%0A%0A%3B%20%2F%2F%20Change%20this%20line%0A%0A%7D%0A%0A%2F%2F%20Change%20these%20values%20to%20test%20your%20function%0Afunction()%7BmyFunction()%3B%7D)()%3B%0A**

**


#2

There is comment
// Only change code below this line.
So change code inside that function (randomRange), dont create ur new function


#4

[// Example
function ourRandomRange(ourMin, ourMax) {

return Math.floor(Math.random() * (ourMax - ourMin + 1)) + ourMin;
}

ourRandomRange(1, 9);

// Only change code below this line.

function randomRange(myMin, myMax) {

return Math.floor(Math.random() * (ourMax - ourMin + 1)) + ourMin;

}

// Change these values to test your function
function randomRange(myMin, myMax) {
return 0 } // Change this line to be exactly like the return line above

This how i did it’d wrong