Step 86
You should tell the player what weapon they bought. In between the two lines you just wrote, use let
to initialize a new variable called newWeapon
. Set this to equal weapons
.
function buyWeapon() {
if (gold >= 30) {
gold -= 30;
currentWeapon++;
goldText.innerText = gold;
text.innerText = "You now have a new weapon.";
}
}