Created
August 30, 2021 17:03
-
-
Save MoodyBones/bf6a2f4b0e53967bbf51ad0a0679ae6f to your computer and use it in GitHub Desktop.
Revisions
-
MoodyBones created this gist
Aug 30, 2021 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,10 @@ function shuffle(array) { for (let i = array.length - 1; i > 0; i--) { const j = Math.floor(Math.random() * (i + 1)) ;[array[i], array[j]] = [array[j], array[i]] } return array } // Snippet by Sarah Drasner // More shuffling ---> https://bost.ocks.org/mike/shuffle/