Skip to content

Passing the array, return the array shuffled. Use Fisher-Yates algorithm.

Notifications You must be signed in to change notification settings

YusukeNakaya/puzzle-array

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

puzzle-array

Passing the array, return the array shuffled. Use Fisher-Yates algorithm.

Installation

npm

$ npm install puzzle-array

unpkg

<script src="https://unpkg.com/puzzle-array" type="text/javascript"></script>

Usage

let array = [0, 1, 2, 3, 4, 5]
array = puzzleArray(array)
console.log(array) // return: [3, 0, 5, 4, 1, 2]

License

MIT

About

Passing the array, return the array shuffled. Use Fisher-Yates algorithm.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published