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

Tell us what’s happening:

Add another object to your locations array. Set name to “easter egg”, set “button text” to an array with the strings “2”, “8”, and “Go to town square?”, set “button functions” to an array with the variables pickTwo, pickEight, and goTown, and text to “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!” this the information given but it is shown that locations array should have 8

Your code so far

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

/* file: styles.css */

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

{
  name:"easter egg",
  "button text":["2","8","Go to town square?"],
  "button functions":[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/122.0.0.0 Safari/537.36 Edg/122.0.0.0

Challenge Information:

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

1 Like

You have an issue here

And remove these curly braces after your object

1 Like