(solved, never mind)

Tell us what’s happening:

Your code so far


// 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() * (15 - 5+1)) + 5; // Change this line

}

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

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36.

Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-javascript/generate-random-whole-numbers-within-a-range

Welcome to the community.

function randomRange(myMin, myMax) {

  return Math.floor(Math.random() * (15 - 5+1)) + 5; // Change this line

}

You are failing this test randomRange should use both myMax and myMin, and return a random number in your range. because of you are not using myMin and myMax arguements in your random range calculations.

You should use myMin and myMax variables in your return statement instead of just using numbers like 15 and 5.

Try it out :slight_smile: