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 ;