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

Tell us what’s happening:

Hi there

I dont know what I am missing

Thanks
Iskren

Your code so far

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

/* file: styles.css */

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

const locations = [
  {
    name: "fight",
  "button text": [ "Attack" , "Dodge" , "run"],
  "button function": ["attack" , "dodge" , "run"],
  text: "You are fighting a monster."
  },
  {
    name: "town square",
    "button text": ["Go to store", "Go to cave", "Fight dragon"],
    "button functions": [goStore, goCave, fightDragon],
    text: "You are in the town square. You see a sign that says \"Store\"."
  },
  {
    name: "store",
    "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
    "button functions": [buyHealth, buyWeapon, goTown],
    text: "You enter the store."
  },
  {
    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 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.4.1 Safari/605.1.15

Challenge Information:

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

Step 115Passed

Add a new object to the end of the locations array,

Your code shows you didn’t add a new obect {} to the end of the locations array [].

// this is an array: "[]"
const arrayWithAllStrings = ["this is an array element", "this is another element"];
const arrayWithAllObjects = [{}, {}, {}]