Step 105 in the java script data structure and algorithm certification(beta)

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

Please post a link to the Step

Welcome to the forum @ROBOTO

Use your code from the line above to structure the assignment operator and variable.

Happy coding

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