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

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"”,
}
];
I dont know what I’m doing wrong. can you guys explain?

instruction:
Give this property the final text.innerText value from the goTown function.

this value is on the 44th line. Look at it carefully, it is not exactly the same as your line for text value.

1 Like

hey thanks,
almost wasted my an hour on this exercise lmao thanks again :heart:.

no probs.

that’s happening sometimes, you’ll never know where you’ll get stuck with this coding stuff

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”: [buyHealth, buyWeapon, goTown],
text: “You enter the store.”
}
];

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.