Learn Basic JavaScript by Building a Role Playing Game - Step 103

is this the correct way to go about this question?

function sellWeapon() {
  if (inventory.length > 1) {
    gold += 15;
    goldText.innerText = gold;
    let currentWeapon;
    shift(sellWeapon);
  }
}```

Please post a link to the Step. Thanks

You have this:

    let currentWeapon;
    shift(sellWeapon);

But based on the example given, previously, is looking for something like

const firstNumber = numbers.shift(); 

So it would start as:

let currentWeapon = ...

You must use the inventory array as it says.

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