function sellWeapon() {
if (inventory.length > 1) {
gold += 15;
goldText.innerText = gold;
let currentWeapon = inventory.shift();
text.innerText = "You sold a " + currentWeapon + ".";
text.innerText += " In your inventory you have: "
I’m a bit stuck here. I need to add the inventory(variable) with the concatenation operator but i can’t get it right.
type or paste code here