Answers for "arry suffle javascript"

0

arry suffle javascript

const shuffle = a => {
    for (let i = a.length; i; i--) {
        let j = Math.floor(Math.random() * i);
        [a[i - 1], a[j]] = [a[j], a[i - 1]];
    }
}
shuffle(arry);
Posted by: Guest on June-26-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language