--- id: 5d67b945e0696bdec46938e7 title: Part 40 challengeType: 0 --- ## Description
Now that the `goTown` function calls the `update` function with the first element of the `locations` array, it is time to use that location information to update the `innerText` and `onclick` properties. Inside the `update` function, change `button1.innerText` to equal `location["button text"]`. That line gets the `"button text"` property of the `location` that was passed into the `update` function`.
## Instructions
## Tests
```yml tests: - text: See description above for instructions. testString: assert(update.toString().match(/button1\.innerText\s*\=\s*location\[[\'\"\`]button text[\'\"\`]\]/)); ```
## Challenge Seed
```html ```
### Before Test
```html RPG - Dragon Repeller
XP: 0 Health: 100 Gold: 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.
```
### After Test
```html ```
## Solution
```html ```