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

Tell us what’s happening:

Describe your issue in detail here.
The code I input is giving me an error. An assistance would be appreciated

Your code so far

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

// User Editable Region

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36

Challenge Information:

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

You appear to have created this post without editing the template. Please edit your post to Tell us what’s happening in your own words.

It’s cause of the dot after “store”.It should be rather:
text: “You are in the town square. You see a sign that says "Store".”;

please i am stucked in line 46 of the code, which says Now you need to modify your display text. Change the innerText property of the text to be You enter the store. .
function goStore() {
button1.innerText = “Buy 10 health (10 gold)”;
button2.innerText = “Buy weapon (30 gold)”;
button3.innerText = “Go to town square”;
button1.onclick = buyHealth;
button2.onclick = buyWeapon;
button3.onclick = goTown;
}

I have checked some of the contributors solutions, but whenever i tried to apply them to my code am still getting error code.
Can anyone explain to a layman like me maybe line by line.

hey @adeoyeshogelola please create your own topic to ask for help

If you have a question about a specific challenge as it relates to your written code for that challenge and need some help, click the Ask for Help button located on the challenge (it looks like a question mark). This button only appears if you have tried to submit an answer at least three times.

The Ask for Help button will create a new topic with all code you have written and include a link to the challenge also. You will still be able to ask any questions in the post before submitting it to the forum.

Thank you.

1 Like

ok will try that out

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