Need help! Step 94

Step 94

At the end of the second text.innerText string you just added, use the concatenation operator to add the contents of inventory to the string.

This is my code:

function buyWeapon() {
if (gold >= 30) {
gold -= 30;
currentWeapon++;
goldText.innerText = gold;
let newWeapon = weapons[currentWeapon].name;
text.innerText = "You now have a " + newWeapon + “.”;
inventory.push(newWeapon);
text.innerText += “In your inventory you have:” += inventory ;

Make sure you have the console pane open. You should be seeing an error in it that might help you figure out what the issue is.

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