let arr = [1,2,3,4,5,6,7,8,9,10]; let n = arr.length; for(var i=n-1;i>0;i--){ var t = arr[i]; arr[i] = arr[this.getRandomInt()]; arr[d] = t; } console.log(arr);
let arr = [1,2,3,4,5,6,7,8,9,10]; let n = arr.length; for(var i=n-1;i>0;i--){ var t = arr[i]; arr[i] = arr[this.getRandomInt()]; arr[d] = t; } console.log(arr);