Skip to content

Commit

Permalink
fix error
Browse files Browse the repository at this point in the history
  • Loading branch information
SCHOUTER committed Jul 5, 2024
1 parent d4fb249 commit 65be3b1
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions docs/3_projects/6_imbit-n3xt/1_tinbit.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ that the cards do not get shuffled when remounting the TinBit components, just w

```js
const shuffleArray = (array) => {
const shuffledArray = array.slice(); // Create a copy of the array
for (let i = shuffledArray.length - 1; i > 0; i--) {
const j = Math.floor(Math.random() * (i + 1));
[shuffledArray[i], shuffledArray[j]] = [shuffledArray[j], shuffledArray[i]];
}
return shuffledArray;
const shuffledArray = array.slice(); // Create a copy of the array
for (let i = shuffledArray.length - 1; i > 0; i--) {
const j = Math.floor(Math.random() * (i + 1));
[shuffledArray[i], shuffledArray[j]] = [shuffledArray[j], shuffledArray[i]];
}
return shuffledArray;
};
```

Expand Down

0 comments on commit 65be3b1

Please sign in to comment.