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

Tell us what’s happening:

in the fightSlime function, set fighting equal to zero. since i declared fighting earlier i don’t use let or const…what is wrong with my code? i set ‘fighting = 0;’ What am i missing?

Your code so far

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

/* file: styles.css */

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

function fightSlime() {
  fighting = 0;
  goFight() {

  }
}

// User Editable Region

Your browser information:

User Agent is: Mozilla/5.0 (X11; Linux x86_64; rv:124.0) Gecko/20100101 Firefox/124.0

Challenge Information:

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

You don’t need curly brackets after goFight(), you just need to call the function.

3 Likes

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