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

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;
}

Thank you for creating your own post @blake833 !

I am not advanced enough to help you.

But, I wanted to assure you would get to have direct, focused and correct guidance from those who are able to assist you.

It is always recommended to make our own posts for this reason.

Keep up your great progress. :monkey_face:

I got it! turns out block needs to be a string. but if someone can explain why to me, I would appreciate it. I understood block to be a formatting style, how does making it a string change its value, or the way the program interacts with the property?

3 Likes

I’m a beginner, so I might be wrong.
Making it a string means treating it as a value and not as a variable.
block = variable
“block” = value

2 Likes

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