shuffle

v0.0.2arrow_drop_down
v0.0.2
v0.0.1
STATUS
Passing
DOWNLOADS
1
LICENSE
MIT
VISIBILITY
Public
PUBLISHED
7 years ago
SIZE
524 B
randomly shuffles an array using Fisher-Yates algorithm
1 contributor
Install shuffle as a package?
Copied
npm i @bit/tomlandau.simple-js.global.shuffle
Set Bit as a scoped registryLearn more
npm config set '@bit:registry' https://node.bit.cloud
Component Example
React
React
Vue
Angular
React Native
Add dependency... help_outline
Just
import
any of the 1 million components
and packages in Bit or NPM to the example.
import Button from '@bit/grommet.grommet.button';
import Lodash from 'lodash';
toggle layout
No preview available
modifieddraft
chevron_left
chevron_right
shuffle (
arr
) : []

randomly shuffles an array using Fisher-Yates algorithm

Example
shuffle([1, 2, 3, 4, 5]) // => [2, 4, 1, 5, 3]
Argument
arr

the array

Returns
[]

the shuffled array

Help and resources