Tell us what’s happening: Objective: Step 117
Now, set the innerText
property of monsterName
to be the name
property of the current monster. Do the same for monsterHealthText
and the health
property.
Your code so far
My code so far:
function goFight() {
update(locations[3]);
monsterHealth = monsters[fighting].health;
monsterStats.style.display = "block";
innerText.monsterName = "name";
innerText.monsterHealthText = "health";
}
It’s telling me " You should use dot notation to access the innerText
property of monsterName
."
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) 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