Randomly shuffles the elements of an array (Fisher-Yates algorithm).
The type of array elements.
The array to shuffle.
A new array with the elements shuffled.
shuffle([1, 2, 3]); // e.g. [3, 1, 2] Copy
shuffle([1, 2, 3]); // e.g. [3, 1, 2]
Randomly shuffles the elements of an array (Fisher-Yates algorithm).