Tell us what’s happening:
Please help, I don’t understand why it doesn’t pass the test.
Isn’t this how it’s supposed to be done?
Your code so far
function attack() {
text.innerText = "The" + monsters[fighting].name + "attacks." ;
}
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36
Challenge Information:
Learn Basic JavaScript by Building a Role Playing Game - Step 117