--- id: 5d6f79667c812010bf3327d6 title: Part 61 challengeType: 0 --- ## Description
The value of `currentWeapon` corresponds to an index in the `weapons` array. The player starts with a stick since `currentWeapon` starts at 0 and `weapons[0]` is the "stick" weapon. In the `buyWeapon` function, add one to `currentWeapon` since the user is buying the next weapon in the `weapons` array.
## Instructions
## Tests
```yml tests: - text: See description above for instructions. # testString: assert((() => { currentWeapon = 0; buyWeapon(); return currentWeapon === 1; })()); testString: currentWeapon = 0, buyWeapon(), assert(currentWeapon === 1); ```
## 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 ```