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

Tell us what’s happening:

Here is my code:
text.innerText = "You picked " + guess + “. Here are the random numbers:”;
Here is the problem: You should use the concatenation operator to add the string “. Here are the random numbers:” to your "You picked " + guess string.
i have placed the concatenation operator , i can’t seem to see or find the problem, any help would be appreciated

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 radom numbers:";
}

// User Editable Region

Your browser information:

User Agent is: Mozilla/5.0 (X11; Linux x86_64) 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 165

There is a typo: random

2 Likes

OMG! :rofl: :rofl: :rofl:

Thank you.

1 Like