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

Tell us what’s happening:

I have tried giving the locations[4] argument but it still do not pass the test. Please help

Your code so far

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

/* file: styles.css */

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

function defeatMonster() {
  gold += Math.floor(monsters[fighting].level * 6.7);
  xp += monsters[fighting].level;
  goldText.innerText = gold;
  xpText.innerText = xp;
  function update(locations[4]) {
    
  };
}

// User Editable Region

Your browser information:

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

Challenge Information:

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

I’m not sure what you intend this to do, but this is invalid syntax. This is a function declaration, but you cannot declare a function in this way

Am I supposed to place it inside the update function. Cause it tried that still didn’t pass the test

do you know how to call a function? you already did this multiple times