From 65be3b1d4ba4fe1e50a386bd41c20358e9822579 Mon Sep 17 00:00:00 2001 From: SCHOUTER Date: Fri, 5 Jul 2024 09:52:36 +0200 Subject: [PATCH] fix error --- docs/3_projects/6_imbit-n3xt/1_tinbit.mdx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/3_projects/6_imbit-n3xt/1_tinbit.mdx b/docs/3_projects/6_imbit-n3xt/1_tinbit.mdx index 8dff5ce..b6356b5 100644 --- a/docs/3_projects/6_imbit-n3xt/1_tinbit.mdx +++ b/docs/3_projects/6_imbit-n3xt/1_tinbit.mdx @@ -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; }; ```