I`m trying to disabled 6 buttons when a condition is met. I have given the buttons the same class. Is there a simplest/shorter way to write ;
var ButtonCollection = document.getElementsByClassName("button");
function PopUp() {
x = L + Y;
var Count = 0;
MonsterDiv2.addEventListener("click", function () {
Count += 1;
if (Count == 2) MonsterDiv2.style.display = "none";
ActionList.innerHTML += `<li>.</li>`;
ButtonCollection[0].disabled = false;
ButtonCollection[1].disabled = false;
ButtonCollection[2].disabled = false;
ButtonCollection[3].disabled = false;
ButtonCollection[4].disabled = false;
ButtonCollection[5].disabled = false;
//
});
}