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

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

You need spaces to make the sentence read properly

If monsters[fighting].name is “dragon” then this would say
Thedragonattacks.
So you need to put spaces in there, in two places

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