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

Tell us what’s happening:

Describe your issue in detail here.

Your code so far

function goStore() {
button1.innertext = “Buy 10 health (10 gold)”.innertext = “You enter the store.”;
button2.innertext = “Buy weapon (30 gold)”.innertext = “You enter the store.”;
button3.innertext = “Go to town square”.innertext = “You enter the store.”;
button1.onclick = buyHealth;
button2.onclick = buyWeapon;
button3.onclick = goTown;
}

// User Editable Region

function goCave() {
console.log(“Going to cave.”);
}

function fightDragon() {
console.log(“Fighting dragon.”);
}

i am unable to figure  out the next step right now, i am at step 46
please could you help me out.
### Your browser information:

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

### Challenge Information:
Learn Basic JavaScript by Building a Role Playing Game - Step 46
https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures-v8/learn-basic-javascript-by-building-a-role-playing-game/step-46

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.

You just need to change the innerText in your text variable by adding another variable in your goStore function:

It should be like this:

text.innerText = "Your Text";
1 Like

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