[1,2,3,4,5,6,7,8]
[8,7,6,5,4,3,2,1]
0 len-1 1 len-1 -1 2 lem-1 -2 function fn(arr){ for(let i = 0;i < arr.length/2;i++){ [arr[i],arr[arr.length -1 -i]] = [arr[arr.length -1 -i],arr[i]] } return arr }