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

Tell us what’s happening:

tried adding a line to my innertext property but still it throws error , any remedies ?

Your code so far

text.innerText += "You attack it with your " + weapons[currentWeapon] + " ."

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) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36 OPR/106.0.0.0

Challenge Information:

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

What error message are you getting? Looking carefully at the exact wording of the error message can often help.

HI @saisiddharthp8 !

Welcome to the forum!

This will resolve most of your issues for why you are failing the test.
Please re read through the error message here to understand what is wrong with your code.
If you need help understanding the error message, then let us know so we can help you.

Once you fix the issues, mentioned in the error message, then you will get a new error message pointing to this issue here

that new error message will give you the exact code you need to solve the challenge.

once you resolve those errors, then the test will pass