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

I cant see where I’m wrong, the only difference between my code and example is the example is const where mine is in text.innertext, I’ve followed the example.

function goTown() {
  button1.innerText = "Go to store";
  button2.innerText = "Go to cave";
  button3.innerText = "Fight dragon";
  button1.onclick = goStore;
  button2.onclick = goCave;
  button3.onclick = fightDragon;
  text.innerText = "You are in the town square. You see a sign that says \"Store.\"";
}

The course checks allow for no substitutions. Do exactly as the instructions say.

Welcome to the forum

The quotes in your code are also nesting the dot.
Is this what the instructions asked for?

Happy coding

2 Likes