let shuffleFn = (arr) =>{
let index = 0 , n = arr.length;
while(index < n){
let rand = index + Math.floor(Math.random() * (n - index));
[arr[rand] , arr[index]] = [arr[index] , arr[rand]];
index++;
}
return arr;
}
console.log(shuffleFn([1,2,3,4,5]))