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

Tell us what’s happening:

Hello all, i’m stuck whit this step,
I don’t know or I can’t see the “problem” on this lines of text, because I use text.innerText, and I respect the spaces before and after of the string
" You attack it whit your " ;
Also I got the name of the current weapon whit the dot (I don’t remember how that call) but call “dot reference”, basically =" weapons[currentWeapon].name
I’m argentinian and I speak in spanish, hope you can understand me and sorry for my bad english,


Your code so far

function attack() {
text.innerText = “The " + monsters[fighting].name + " attacks.”;
text.innerText = " You attack it with your " + weapons[currentWeapon].name + “.”;

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 120


You have to add the new text to the current one.
remember the shortform of

text.innerText = text.innerText + x

for the solution.

I just realized I’m in the Spanish chat! I hope ChatGPT didn’t mess up:


Debes agregar el nuevo texto al actual. Recuerda la abreviatura de

text.innerText = text.innerText + x

para la solución.

1 Like

Hi Daniel, good morning!

Thank you very much!

I can apply your advice and work it’s!

And thanks too for take your time for translate the answer with Chat GPT, I appreciate♥