Skip to main content
The Deno 2 Release Candidate is here
Learn more
method RandomUtil.prototype.shuffle
import { RandomUtil } from "https://deno.land/x/sptaki@1.2.0/utils/RandomUtil.d.ts";

Fisher-Yates shuffle an array

Parameters

array: Array<T>

Array to shuffle

Returns

Array<T>

Shuffled array