把数组 arr= [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]先乱序打乱输出数组arr1,然后将arr1按倒序的方式排序输出arr2
letarr=[1,2,3,4,5,6,7,8,9,10]functiondisorder(){for(leti=arr.length;i;i--){letj=Math.floor(Math.random()*i);[arr[i-1],arr[j]]=[arr[j],arr[i-1]];}returnarr;}letarr1=disorder(arr)console.log(arr1)letarr