I'm stuck at this step 59

Add a second object to your locations array (remember to separate them with a comma). Following the pattern you used in the first object, create the same properties but use the values from the goStore function. Set the name property to store .

Please post your actual code instead of a screenshot. Also, please post a link to the Step. Also, please talk to us in your own words about how you’re stuck. Thanks

Please use the “Ask for Help” button in the challenge if you’re stuck.

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.",
    }
];

An object is contained in { }, an array of objects is structured like:

[
{data: “data”, data: “data”},
{data: “data”}

]

So what is the problem?

It says that the locations array should have two values.

Are you trying to add a new object to the existing array?

separate the two chunks with {},{}

like { name: “town square”
“button text”

}, { name: “store”,
“button text”

thats how you add two values

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