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

Tell us what’s happening:

Am I missing something here? Unable to get this lesson to pass with this code:

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

The error message says “your buyHealth function should update the text of healthText to be the value of health.”

Your code so far

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

/* file: styles.css */

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

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

// User Editable Region

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:124.0) Gecko/20100101 Firefox/124.0

Challenge Information:

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

Hello @bratsethr!
Do you remember camelCasing?

Thank you! That was a bit embarrassing… :wink:

It’s okay :sweat_smile:, we all make mistakes sometimes