arr[oneIndex] = [arr[twoIndex], arr[twoIndex] = arr[oneIndex]][0] 更简单的:let x = 1let y = 2[x, y] = [y, x]