--- id: 5d80c3c021b11cdaa3f6b165 title: Part 114 challengeType: 0 dashedName: part-114 --- # --description-- At the end of the code, create a `restart` function. Inside the function, set `xp` to 0, set `health` to 100, set `gold` to 50, set `currentWeapon` to 0, and set `inventory` to `["stick"]`. Also, update the `innerText` properties of `goldText`, `healthText`, and `xpText` to their current values. Finally, call the `goTown()` function. After this step is a good time to test the game so far. # --hints-- See description above for instructions. ```js (currentWeapon = 1), (inventory = ['stick', 'dagger']), fightSlime(), attack(), defeatMonster(), restart(), assert( xp === 0 && gold === 50 && currentWeapon === 0 && inventory[0] === 'stick' && inventory.length === 1 && goldText.innerText === '50' && healthText.innerText === '100' && xpText.innerText === '0' && text.innerText === 'You are in the town square. You see a sign that says "Store."' ); ``` # --seed-- ## --before-user-code-- ```html