I declared some variables:
var availableTile1 = document.getElementById("c1");
var availableTile2 = document.getElementById("c2");
var availableTile3 = document.getElementById("c3");
var availableTile4 = document.getElementById("c4");
var availableTile5 = document.getElementById("c5");
var availableTile6 = document.getElementById("c6");
As you see, only the number is different. Is there a quicker and clearer way of defining all variables at once?
Note: I heard about "destructuring assignment", but I couldn't apply it with document.getElementById.6 Thank you for your answers.
EDIT:
availableTile.style.border = "none";
availableTile.style.backgroundColor = "transparent";
This works if availableTile is an Id, but somehow not if it is a class?!