Algorithmic Step 86

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.";

}
}

can you tell us what help do you need here?

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.