mirror of
https://github.com/TheAlgorithms/JavaScript.git
synced 2025-07-06 09:28:26 +08:00
Update FisherYatesShuffle.js
Splited initialized 'let' declarations into multiple statements
This commit is contained in:
@ -1,7 +1,7 @@
|
|||||||
export const shuffle = (array) => {
|
export const shuffle = (array) => {
|
||||||
let maxLength = array.length,
|
let maxLength = array.length
|
||||||
temp,
|
let temp
|
||||||
idx
|
let idx
|
||||||
|
|
||||||
// While there remain elements to shuffle...
|
// While there remain elements to shuffle...
|
||||||
while (maxLength) {
|
while (maxLength) {
|
||||||
|
Reference in New Issue
Block a user