Returns a shuffled copy of the input array.
Type of array items
Random generator. Math.random by default.
Math.random
Copy with items moved around randomly
const d = [1, 2, 3, 4];const s = shuffle(d);// d: [1, 2, 3, 4], s: [3, 1, 2, 4] Copy
const d = [1, 2, 3, 4];const s = shuffle(d);// d: [1, 2, 3, 4], s: [3, 1, 2, 4]
Returns a shuffled copy of the input array.