Generate Random Whole Numbers within

Generate Random Whole Numbers within
0.0 0

#1

This is my code

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() * (max - min + 1)) + min

; // Change this line

}

// Change these values to test your function
var myRandom = randomRange(10, 15);

see https://www.freecodecamp.com/challenges/generate-random-whole-numbers-within-a-range#?solution= %2F%2F%20Example function%20ourRandomRange(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.%0A%0Afunction%20randomRange(myMin%2C%20myMax)%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%0Avar%20myRandom%20%3D%20randomRange(10%2C%2015)%3B%0A