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

Tell us what’s happening:

Hi, I’m stuck on how to change gold a health text. I’ve read about it being defined further up in the code, but can’t think of how to complete this step.

Step 75

Now that you are updating the gold and health variables, you need to display those new values on the game screen.

After your assignment lines, assign the innerText property of goldText to be the variable gold. Use the same pattern to update healthText with the health variable.

function buyHealth() {
gold -= 10;
health += 10;
goldText();
healthText();
}

Your code so far

<!-- file: index.html -->

/* file: styles.css */

/* file: script.js */
// User Editable Region

function buyHealth() {
  gold -= 10;
  health += 10;
  goldText();
  healthText();
}

// User Editable Region

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36

Challenge Information:

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

Hi there! Well, you have to

After your assignment lines, assign the innerText property of goldText to be the variable gold .

Follow the example:

total.innerText = value;

Variable gold must be your value

That Syntex is called calling function. And the instructions asking for update The innerText property of required variables, given in the instructions.
@SteveHughesUX