I'm struggling to understand how to shuffle my cards for my card matching game. Would someone please be kind enough to break things down line by line, giving me instructions in a step by step approach to what I need to do to shuffle my cards. Would mean a lot as I'm on a course and have until July 8th to complete it.
HTML
<div class="Soprano-card">
<div class="Back-card">
<img class="Soprano_image" src="assets/img/Characters/Tony-Soprano.jpg" alt="Characters">
</div>
<div class="front-card">
<img class="Soprano_image" src="assets/img/Sopranos-Title.jpg" alt="Sopranos-Title">
</div>
</div>
JS
// Flipping the cards
let cards = document.querySelectorAll('.Soprano-card');
let card = [...cards];
function flipCard() {
this.classList.toggle("flip");
}
cards.forEach((card) => card.addEventListener("click", flipCard));