Learn basic Java script step 118

Hi I have solved step 118 but I am not sure why the code works. Here is the question it is asking. I don’t understand where the innerText is coming from or what is does. Any help will be much appreciated :slight_smile:

" 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."

and then here is the code I submitted

function goFight() {
  monsterHealth = monsters[fighting].health;
  monsterStats.style.display = "block";
  monsterName.innerText = monsters[fighting].name;
  monsterHealthText.innerText = monsters[fighting].health;


Hi I did a little more searching and answered my own question innerText is a property that changes the text of an element. Ill make sure to do a little more research next time :slight_smile: