威威

Results 1 comments of 威威

let arr = [1, 2, 3, 4, 5, 6, 7]; function handleArr(arr,k){ while(k--){ arr.unshift(arr.pop()) } return arr } let newArr = handleArr(arr,2) console.log(newArr)