数组交换位置

// 数组交换位置
    arrayElemSwapPosition (arr, indexA, indexB) {
      var $this = thisarr.splice(indexA, 1, ...arr.splice(indexB, 1, arr[indexA]))
console.log(arr) }
原文地址:https://www.cnblogs.com/vae860514/p/11586312.html