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

Stuck on step 59 can’t seem to find problem. I separated each of the objects and the components within them. I don’t know why it keeps saying “Your locations array should have two values.” Thanks

const locations = [
  {
    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": [byHealth, buyWeapon, goTown],
    text:"You enter the store."
  }
];

Please post a link to the step - thanks

image

That little underline means something is wrong here! Check your spelling!!

You have a typo here: byHealth.

1 Like

thank you so much that was a simple stupid mistake.

Everyone needs a second pair of eyes sometimes.