Help regarding Debugging

I cant see my error.
here’s the question: Update the console statement to print a whole number between 0 and 9.

Remember that you worked with a method in the Role Playing Game that rounds a number down to the nearest whole number.

here’s my code

function getRandomIndex() {

console.log(Math.floor((darkColorsArr.length) * Math.random() * 10))

}

getRandomIndex();

hello and welcome to fcc forum :slight_smile:

share this “step/exercise” url as well, happy coding :slight_smile:

Getting any errors or hints?

Why would you need the array length, then?

As said, we need to know what challenge step you are on.

hi…here’s the url

Did you read lasjorg’s comment? He points out a mistake you made.

yes the colution was found