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

Tell us what’s happening:

Hello Family please help me solve this Im kinda stack

Your code so far

<!-- file: index.html -->

/* file: script.js */
// User Editable Region

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

// User Editable Region
/* file: styles.css */

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36

Challenge Information:

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

Consider the example code again. Yours should look similar.

const firstElement = myArray.shift();