--- id: 5d661814e0696bdec46938d7 title: Part 25 challengeType: 0 dashedName: part-25 --- # --description-- Move the `goTown` function to above the `goStore` function. Then, copy and paste the contents of the `goStore` function into the `goTown` function. # --hints-- See description above for instructions. ```js 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\;?/) ); })() ); ``` # --seed-- ## --before-user-code-- ```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-user-code-- ```html ``` ## --seed-contents-- ```html ``` # --solutions-- ```html ```