shuffling algorithm, Reordering arrays or strings
arrays or strings
Optional
new array or string length
const str = 'abcde'const arr = [1,2,3]shuffle(str)// cdbseshuffle(arr)// [3, 1, 2]shuffle(arr, 2)// [3, 2] Copy
const str = 'abcde'const arr = [1,2,3]shuffle(str)// cdbseshuffle(arr)// [3, 1, 2]shuffle(arr, 2)// [3, 2]
5.4.0
shuffling algorithm, Reordering arrays or strings