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

bit of condused here on what do next

Step 117

Now you can build the attack function. First, update the text message to say "The <monster name> attacks.", replacing <monster name> with the name of the monster. Remember you can use the concatenation operator for this.

my code : function attack() {
text.innerText("The "+monsters.name())

solution saying : You should assign the string The to innerText property of text .


The challenge seed code and/or your solution exceeded the maximum length we can port over from the challenge.

You will need to take an additional step here so the code you wrote presents in an easy to read format.

Please copy/paste all the editor code showing in the challenge from where you just linked.

Replace these two sentences with your copied code.
Please leave the ``` line above and the ``` line below,
because they allow your code to properly format in the post.

Your browser information:

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

Challenge Information:

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

Hi! Update the text using assignment operator which is =
And then you should add the value of monsters[fighting].name to the The string.

not working

Remove the brackets and use the assignment operator to update the text, aslo add spaces before and after +

text.innerText should be equal to the string and also dont forget to add + sign and put “.” in the end . Hope it will clear your problem.

Hi , you are missing the attacks and also add a string by concatenating the name with the rest of the message for example " attacks."
Also , from your code i see you are missing the "= " on line 3 like this
text.innerText =
Hope this helps.