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

Tell us what’s happening:

The problem it says I have with my code is that I should have three values in my locations array. I do, or at least think I do. I also have four properties in my third object in the locations array, so I don’t think that’s the problem either. Furthermore, I checked to make sure I spelled everything correctly. However, I still can’t find the error. Please help.

Your code so far

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

/* file: styles.css */

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

{
  name: "cave",
  "button text": ["Fight slime", "Fight fanged beast", "Go to town square"],
  "button functions": [fightSlime, fightBeast, goTown],
  text: "You enter the cave. You see some monsters."
}

// 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/123.0.0.0 Safari/537.36 OPR/109.0.0.0 (Edition std-1)

Challenge Information:

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

Hi there! Your code passes for me. Check your code above for some unclosed brackets or smth

Ok never mind. Seems like I accidentally edited a random piece of code somewhere where I shouldn’t have without knowing. All I had to do was reset the code and try again. In summary, I passed.

1 Like

Yea I found what i did wrong lol.

1 Like