--- title: 'JavaScript 交换数组元素位置' date: 2021-07-24 18:27:00 --- ```javascript ;[value[index - 1], value[index]] = [value[index], value[index - 1]] ```