---
id: 5d661814e0696bdec46938d7
title: Part 25
challengeType: 0
isBeta: true
---
## Description
Move the `goTown` function to above the `goStore` function. Then, copy and paste the contents of the `goStore` function into the `goTown` function.
## Instructions
## Tests
```yml
tests:
- text: See description above for instructions.
# testString: assert(goTown.toString().match(/button1\.innerText\s*\=\s*[\'\"\`]Buy 10 health \(10 gold\)\.?[\'\"\`]/) && goTown.toString().match(/button2\.innerText\s*\=\s*[\'\"\`]Buy weapon \(30 gold\)\.?[\'\"\`]/) && goTown.toString().match(/button3\.innerText\s*\=\s*[\'\"\`]Go to town square\.?[\'\"\`]/) && goTown.toString().match(/button1\.onclick\s*\=\s*buyHealth\;?/) && goTown.toString().match(/button2\.onclick\s*\=\s*buyWeapon\;?/) && goTown.toString().match(/button3\.onclick\s*\=\s*goTown\;?/) && goTown.toString().match(/text\.innerText\s*\=\s*[\'\"\`]You enter the store\.?[\'\"\`]/));
testString: assert((() => { goTown(); return button1.innerText === "Buy 10 health (10 gold)" && button2.innerText === "Buy weapon (30 gold)" && button3.innerText === "Go to town square" && text.innerText === "You enter the store." && goTown.toString().match(/button1\.onclick\s*\=\s*buyHealth\;?/) && goTown.toString().match(/button2\.onclick\s*\=\s*buyWeapon\;?/) && goTown.toString().match(/button3\.onclick\s*\=\s*goTown\;?/)})());
```
## 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.