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

Tell us what’s happening:

why am i getting the following feedback on my code;Your eighth locations value should have a “button text” array with the strings “2”, “8”, and “Go to town square?”.

Your code so far

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

/* file: styles.css */

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

{
  name: "easter egg",
buttonText: ["2", "8", "Go to town square?"],
  buttonFunctions: [pickTwo, pickEight, goTown],
  text: "You find a secret game. Pick a number above.Ten numbers will be randomly chosen between 0 and 10. If the number you choose matches one of the random numbers, you win!"
}

// 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/126.0.0.0 Safari/537.36

Challenge Information:

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

1 Like

Hello @Sharon,

Your buttonText property needs to be two words separated by a space and surrounded by quotes.

Does this help?

Keep up the good progress!

Happy Coding! :slightly_smiling_face:

1 Like

Hello!

Along with the good guidance provided in the post above, here are a few other things to check with your code.

  1. Two word properties should be placed in quotes.
  2. Make sure the properties and values are exactly as in the instructions (lower case).
  3. Check the spacing in the text property value.

I hope this helps, along with the information provided in the post by ios-man above.

May your coding journey continue smoothly.

1 Like