Tell us what’s happening:
I’m not sure what is wrong with this code. It looks like it should run, but I cannot pass it.
Your code so far
<!-- file: index.html -->
/* file: styles.css */
/* file: script.js */
// User Editable Region
function attack() {
text.innerText = "The " + monsters[fighting].name + " attacks.";
text.innerText += " You attack it with your " += currentWeapon + ".";
}
// User Editable Region
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:132.0) Gecko/20100101 Firefox/132.0
Challenge Information:
Learn Basic JavaScript by Building a Role Playing Game - Step 121