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

What’s wrong?

Step 133

After a monster is defeated, the monster’s stat box should no longer display.

On the first line of the update function, use monsterStats.style.display to change the display value to none.

function update(location) {
monsterStats.style.display = none;
button1.innerText = location[“button text”][0];
button2.innerText = location[“button text”][1];
button3.innerText = location[“button text”][2];
button1.onclick = location[“button functions”][0];
button2.onclick = location[“button functions”][1];
button3.onclick = location[“button functions”][2];
text.innerText = location.text;
}

1 Like

none should be a string

3 Likes

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