Role Playing Gane - Step 49

I’m trying to run the code checker, but the button isn’t working.

Instruction is " Wrap the text Store in double quotes within your text.innerText line"

Here’s what I have so far.

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

Hey your going to have to find out about double quotes inside double quotes here. If thats the case you may need to use the escape method.

You need to add back slash before and after your store text

So I did

text.innerText = “You are in the town square. You see a sign that says "Store”.";

And it resulted in “SyntaxError: unknown: Expecting Unicode escape sequence \uXXXX. (32:82)”

Fixed it! Turns out I had to do the backslash after the quotes

Very good, keep it up. Happy Coding!

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