sei-ec-remote / project-1-issues

Open new issues here
1 stars 2 forks source link

Shuffle Function is not running #249

Closed Tessabaxter12 closed 9 months ago

Tessabaxter12 commented 9 months ago

What's the problem you're trying to solve?

Trying to shuffle the array of the front images

Post any code you think might be relevant (one fenced block per file)

function shuffleCards() {
  for(Let [i] = cards.length -1; i > 0; i--) {
    let randomIndex = Math.floor(Math.random() * (i+1));
    cards[randomIndex].name.order = i;
    cards[i].name.order = randomIndex;
  }
}

If you see an error message, post it here. If you don't, what unexpected behavior are you seeing?

What is your best guess as to the source of the problem?

Not calling the front of the image correctly

What things have you already tried to solve the problem?

Researching and MDN

Paste a link to your repository here

https://github.com/Tessabaxter12/Memory_Game

timmshinbone commented 9 months ago

add a comment above each line in that function describing what each line is supposed to be doing and share that here as a reply