Created
June 11, 2020 16:05
-
-
Save okovalov/aed6057958bda3e853e8ea92ebd8338d to your computer and use it in GitHub Desktop.
Revisions
-
okovalov created this gist
Jun 11, 2020 .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,9 @@ const shuffle = arr => arr.sort(() => Math.random() - 0.5) const data = [1, 2, 3, 4, 5, 6, 7, 8, 9] console.log('Data 1', data) console.log('Data 2', shuffle(data)) console.log('Data 3', shuffle(data)) console.log('Data 4', shuffle(data)) console.log('Data 5', shuffle(data))