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

Tell us what’s happening: The instructions say I should getMonsterAttackValue and it should take level as a parameter. It doesn’t like the brackets around “fighting” and it doesn’t like the dot notations for level. Says my code does not pass

### Your code so far


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.

function getMonsterAttackValue (monsters[fighting].level) {


Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.1.2 Safari/605.1.15

Challenge Information:

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

you can’t do that in a function argument, that’s why it doesn’t like it, it’s a syntax error

If I just add “level” as the parameter, it doesn’t like that either. What am I missing here?

function getMonsterAttackValue (level) {


remove the space before the (, let’s try that

no luck… still says the same error.

function getMonsterAttackValue (level){


you have not deleted the space before (

1 Like

This worked… It didn’t like the space between “getMonsterAttackValue” and “(”

function getMonsterAttackValue(level){


there is usually a space between ) and {, you can keep that one

got it. Thank you so much ilenia!!!

I’ve edited your code for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (').

Okay, Thank you for the feedback. This is my first actual post here asking for help. Thank you!