let allCards = document.getElementsByClassName("card");
let oddCards, evenCards;
for (let index = 0; index < allCards.length; index++) {
if (index % 2 !== 0) {
oddCards.push(index);
} else {
evenCards.push(index);
}
}
oddCards.forEach(item => item.classList.add("card--fly-up"));
evenCards.forEach(item => item.classList.add("card--fly-down"));
What do you get?
Обсуждают сегодня