upBtn.addEventListener("click", () => {
let index = cardIndex + 1;
if (index >= cards.length) {
index = 0;
}
show(index);
});
downBtn.addEventListener("click", () => {
let index = cardIndex - 1;
if (index < 0) {
index = cards.length - 1;
}
show(index);
});