Hello everyone kindly walk me through this challenge.
the instruction is below;
" 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."
my code is below;
function goFight() {
update(locations[3]);
monsterHealth = monsters[fighting].health;
monsterStats.style.display = "block";
monsterName.innerText = monsters[fighting].name;
}
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.2.1 Safari/605.1.15
Challenge Information:
Learn Basic JavaScript by Building a Role Playing Game - Step 117