Step 57 - Learn Basic JavaScript By Building A Role Playing Game

I am not getting feedback when i submit code so not sure if i am on the right path.

const locations = [
  {
    name: "town square",
    "button text": ["Go to store", "Go to cave", "Fight dragon"],
    "button functions": [goStore, goCave, fightDragon],
    text.innerText = "You are in the town square. You see a sign that says \"Store\".";
  }
];

Please put the link to the Step back

you need to add a text property, you can’t use assignment in an object

1 Like

as in like this?

text = "You are in the town square. You see a sign that says \"Store\".";```

that is still an assignment, look at the other properties in the object

the question is
Add one final property to the object named text . Give this property the same string value as the one assigned to text.innerText in the goTown function.

i tried this

const locations = [
  {
    name: "town square",
    "button text": ["Go to store", "Go to cave", "Fight dragon"],
    "button functions": [goStore, goCave, fightDragon],
    "button text": ["You are in the town square. You see a sign that says \"Store\"]
  }
];```

you already have button text property, this one should be named text and its value should be a string, not an array