mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-02-24 02:01:30 -05:00
fix(curriculum): remind users about healthText rpg step 76 (#55210)
This commit is contained in:
@@ -7,18 +7,10 @@ dashedName: step-76
|
||||
|
||||
# --description--
|
||||
|
||||
Now that you are updating the `gold` and `health` variables, you need to display those new values on the game screen.
|
||||
Now that you are updating the `gold` and `health` variables, you need to display those new values on the game screen. You have retrieved the `healthText` and `goldText` elements in a prior step.
|
||||
|
||||
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.
|
||||
|
||||
Here is an example:
|
||||
|
||||
```js
|
||||
let value = 100;
|
||||
const total = document.querySelector('#total');
|
||||
total.innerText = value;
|
||||
```
|
||||
|
||||
You can test this by clicking your `"Go to store"` button, followed by your `"Buy Health"` button.
|
||||
|
||||
**Note:** Your answer should only be two lines of code.
|
||||
|
||||
Reference in New Issue
Block a user