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

Tell us what’s happening:

I have made multiple attempt on the code and I’m still not getting it right. any hint or help will go along way.

Your code so far

gold += Math.floor(monster.level * 6.7);
let gold = monsterLevel * 6.7;
gold += Math.floor(monsterLevel * 6.7);

gold += Math.floor(monster[fighting].level * 6.7);


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:109.0) Gecko/20100101 Firefox/119.0

Challenge Information:

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

This seems close. What error message do you get for this? Can you talk about what got you stuck in that message?

I think you would access the level in the same way as the name monsters[fighting].name

1 Like

thank you for the clue and I figured it out to be


which i already tried multiple times, maybe due to my several attempts that why it didn’t work at the time.

It is great that you solved the challenge, but please don’t post your full working solution

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.

Next time read the error messages in the console as @JeremyLT mentioned and the hints more closely. You should never need to just randomly try different combinations of the exercises words to pass. Mostly never. You should try to understand what you’re typing in.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.