Skip to content

Commit 831673e

Browse files
committed
Update consolidated snippets
1 parent 1627dd5 commit 831673e

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

public/consolidated/all_snippets.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,25 @@
352352
"utility"
353353
],
354354
"author": "dostonnabotov"
355+
},
356+
{
357+
"title": "Shuffle Array",
358+
"description": "Shuffles an Array.",
359+
"code": [
360+
"function shuffleArray(array) {",
361+
" for (let i = array.length - 1; i >= 0; i--) {",
362+
" const j = Math.floor(Math.random() * (i + 1));",
363+
" [array[i], array[j]] = [array[j], array[i]];",
364+
" }",
365+
"}"
366+
],
367+
"tags": [
368+
"javascript",
369+
"array",
370+
"shuffle",
371+
"utility"
372+
],
373+
"author": "loxt-nixo"
355374
}
356375
]
357376
},

0 commit comments

Comments
 (0)