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

Tell us what’s happening:

gives error: You should use dot notation to access the style property of monsterStats .

### Your code so far

function goFight() {
  update(locations[3]);
  monsterHealth = monsters[fighting].health;
  block.style.display = "monsterStats
}

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

Challenge Information:

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

First, click on console in the upper right to open the console, and you will see a little arrow pointing to that random quote mark in front of monsterStats

Next,

Display the monsterStats element by updating the display property of the style property to block.

You are setting something to block, so it should end in = "block"

You are setting the display property of the style property of the monsterStats element to "block"

3 Likes

thank you so much!!!

3 Likes

I’m having problems with this lesson as well. My code is below, and the only response from the console i’m getting is " You should set the display property to block." I’ve tried monsterStats.display.style = block; and more rearrangements of those

function goFight() {
update(locations[3]);
monsterHealth = monsters[fighting].health;
monsterStats.style.display = block;
}

Hello @blake833 !

Please create your own post with all of you code?

This will allow the community to better assist you with correct guidance for the problem with the code.

Thank you!

Keep up the good progress. :monkey_face:

ok! i didn’t know if that would be excessive but I can do that!

1 Like

Please always create your own post

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