shuffleInPlace
shuffleInPlace<
T>(items):T[]
Defined in: src/global/collections.ts:160
Fisher–Yates in place: the only mutating shuffle.
Type Parameters
Section titled “Type Parameters”T
Parameters
Section titled “Parameters”T[]
Returns
Section titled “Returns”T[]
Example
Section titled “Example”const deck = [1, 2, 3, 4, 5];shuffleInPlace(deck); // deck itself is reordered and returned