deno.land / x / rambda@v9.1.1 / source / shuffle.js
1234567891011121314export function shuffle(arrayRaw){ const array = arrayRaw.concat() let counter = array.length while (counter > 0){ const index = Math.floor(Math.random() * counter) counter-- const temp = array[ counter ] array[ counter ] = array[ index ] array[ index ] = temp }
return array}
Version Info