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 
share this “step/exercise” url as well, happy coding 
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.
hbar1st
6
Did you read lasjorg’s comment? He points out a mistake you made.
yes the colution was found