Unable to reset element to a vlaue of 0 [closed]

You should assign it, not compare.

function resetAll() {   
  var getAllButttons = document.getElementsByClassName("click-button");
   for (i = 0; i < getAllButtons.length; i++) { 
   // getAllButtons[i].value == 0; // Here you're comparing it
      getAllButtons[i].value = 0;
   }
}

Leave a Comment