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

Tell us what’s happening:

Describe your issue in detail here.
I’m not sure of what is required. I need help

Your code so far

function goStore() {
  button1.innerText = "You enter the store.";
  button2.innerText = "Buy weapon (30 gold)";
  button3.innerText = "Go to town square";
  
  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.");
}

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 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.

Hello!

  • Add another line:

  • Append “innerText” to “text” like you see in the code in the same function.

  • Assign it with “=” to the sentence in the challenge. Remember to make the sentence a string and to copy the exact syntax.

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