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

Tell us what’s happening:

I don’t understood where is the problem, I tried also with different space

### Your code so far

function attack() {
  text.innerText = "The "+ monsters[fighting].name +"attacks. "
}

WARNING

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; rv:121.0) Gecko/20100101 Firefox/121.0

Challenge Information:

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

you can give space between monster
Mod Edit: Removed Solution

It is great that you solved the challenge, but instead of posting your full working solution, it is best to stay focused on answering the original poster’s question(s) and help guide them with hints and suggestions to solve their own issues with the challenge.

We are trying to cut back on the number of spoiler solutions found on the forum and instead focus on helping other campers with their questions and definitely not posting full working solutions.

2 Likes

no, I have not found the solution!

My response was not to you, but the one who provided the solution. Have you tried what they suggested?

2 Likes

If they gave me the solution I had not time to see it, I tried to put space around monster but it doesn’t work.

function attack() {
  text.innerText = "The " + monsters[fighting].name + "attacks. "
}

I tryed with differents ways to spacing the text…

now you give extra space in attacks.

2 Likes

the space needs to go before the word attacks not after

1 Like

the solution is

Mod edit: removed

need space before " attack" not after

2 Likes