I have a question: is it possible to exchange background according to one condition? Example:
function A() {
if (meuArray.length === 7) {
i want background green
} else {
background blue
}
}
At first I'm doing a card game called Black Jack or 21 in Brazil, and so far I have not found a viable form of background or a CSS in the array that contains the values of each card.
Would anyone have a tip or how to do it? Thank you.
document.getElementById('iwantgreen').style.backgroundColor = "green";
– pryxen Jun 7 '18 at 3:09