JavaScript help/ issue with loops

I’m new into this but basically I’m trying to make a JavaScript loop, where 2 fighters fight. I made an array with the 2 fighters and a button connected to my JavaScript from HTML. Now I need to make a loop where the fighters hit each other where the damage by 1 fighter is subtracted by the health of the other so on, later I need to display how the fight went in my html. but I don’t know where to start I would be thankful for some help. This is what I have done and I don’t know what to do after or if it is even right?

var fighters =  [
{
  "name":"Abdi",
  "HP": 100,
  "DMG": 20,
}
{
  "name": "chriz",
  "HP": 100,
  "DMG": 11,
}

]
function myFunction() {
  for (var i = 0; i < fighters.length; i++) {
    fighters[i]
  }
}

Answer

function myFunction() {

  while (fighters[0].HP > 0 && fighters[1].HP > 0) {
  fighters[1].HP -= fighters[0].DMG;
  fighters[0].HP -= fighters[1].DMG;
  document.getElementById('Results').innerHTML+= fighters[1].HP ;
  document.getElementById('Results').innerHTML+= fighters[0].HP;
}