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

I keep getting an error indicator telling me button functions is spelled incorrectly, me preview keeps disappearing and when I click check my code nothing happens, not getting the prompt to keep it up or help

const locations = [
    name: "town square",
    "button text": ["Go to store", "Go to cave", "Fight dragon"]
    "button functions": [goStore, goCave, fightDragon]

Remember that object items are separated by a comma

a single comma, man this is brutal :rofl: :rofl: :rofl: :rofl: :rofl: working now

Sometimes it’s helpful to throw everything into something like playcode.io which will help you identify syntax errors quickly. Opening the console in the fCC window might also help.

1 Like