Learn Basic JavaScript by Building a Role Playing Game - Step 167

Tell us what’s happening:

Not sure why this is not going through. The tutor prompt is saying the loop is not initialized but it appears pretty initialized to me…

Your code so far

<!-- file: index.html -->

/* file: styles.css */

/* file: script.js */
// User Editable Region

function pick(guess) {
  const numbers = [];
  while (numbers.length < 10) {
    numbers.push(Math.floor(Math.random() * 11));
  }
  text.innerText = "You picked " + guess + ". Here are the random numbers:\n";
  
}

for (let i = 0; i < 10; i++){
  
};

// User Editable Region

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36

Challenge Information:

Learn Basic JavaScript by Building a Role Playing Game - Step 167

The Loop should be within the function pick

But they didn’t say it in the tutor prompt

@booleanmethod9 The instructions didn’t said that. But the editor have empty lines for that loop within the function. If you reset that challenge, in the challenge editor Only one empty line is available for that loop and that line empty line is within the function.

Thank you for helping make FCC better. Bugs can be reported as GitHub Issues. Whenever reporting a bug, please check first that there isn’t already an issue for it and provide as much detail as possible.