Learn-basic-javascript-by-building-a-role-playing-game - Step 46

I have been finding it hard to progress to the next stage after trying all i could.

The question is: Now you need to modify your display text. Change the innerText property of the text to be You enter the store.

1 Like

Can you provide us with your code?

You need to set the innerText of the text property to “You enter the store .” you should use dot notation for this

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;
}

1 Like

how do i go about this, i tried couple of times but my effort was to no avail.

It is great that you solved the challenge, but instead of posting your full working solution, it is best to stay focused on answering the original poster’s question(s) and help guide them with hints and suggestions to solve their own issues with the challenge.

We are trying to cut back on the number of spoiler solutions found on the forum and instead focus on helping other campers with their questions and definitely not posting full working solutions.

1 Like

I understand, it won’t happen again .

1 Like

Thanks. finally solved it.