---
id: 5d6905ace0696bdec46938f3
title: Part 52
challengeType: 0
---
## Description
Now that the gold and health variables have been updated, we need to update the values displayed on the screen. Inside the `buyHealth` function, add the line `goldText.innerText = gold;`. Then use the same pattern to update `healthText`.
## Instructions
## Tests
```yml
tests:
- text: See description above for instructions.
testString: assert(buyHealth.toString().match(/goldText\.innerText\s*\=\s*gold\;?/) && buyHealth.toString().match(/healthText.innerText\s*\=\s*health\;?/));
# testString: assert((() => { buyHealth(); return goldText.innerText === '40' && healthText.innerText === '110'; })());
```
## Challenge Seed
```html
```
### Before Test
```html
RPG - Dragon Repeller
XP: 0Health: 100Gold: 50
Monster Name: Health:
Welcome to Dragon Repeller. You must defeat the dragon that is preventing people from leaving the town. You are in the town square. Where do you want to go? Use the buttons above.