Tell us what’s happening:
Hola a todos, me podrían ayudar con este ejercicio. Ya lo he intentado hacer de varias formas, pero no comprendo bien como hacerlo.
Your code so far
ADVERTENCIA
El código semilla del desafío y/o tu solución excedió la longitud máxima que podemos transferir del desafío.
Tendrás que dar un paso adicional aquí para que el código que escribiste se presente en un formato fácil de leer.
Por favor, copia/pega todo el código del editor que se muestra en el desafío desde el que acabas de enlazar.
function attack() {
text.innerText = “The " + monsters[fighting].name + " attacks.”;
text.innerText += " You attack it with your " + weapons[currentWeapon].name + “.”;
health -= monsters[fighting].level;
monsterHealth -= weapons[currentWeapon].power;
monsterHealth += Math.floor(Math.random() * xp) + 1;
}
Your browser information:
El agente de usuario es: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36
Challenge Information:
Learn Basic JavaScript by Building a Role Playing Game - Step 123
Hola. Conseguiste pasar de este paso finalmente?
Hello, I couldn’t get past this exercise.
You have two issues here
no.1
You need to use the plus operator here not the +=
No.2
You need to update this line here and add your solution here
not creating a new line like you did here
once you fix those things, then it will pass
There was also an issue here to help beginners know where to write their code
The fix should show up in production soon