Lodash -Swap -Array -Elemente
const swapArrayLocs = (arr, index1, index2) => {
[arr[index1], arr[index2]] = [arr[index2], arr[index1]]
}
Outrageous Orangutan
const swapArrayLocs = (arr, index1, index2) => {
[arr[index1], arr[index2]] = [arr[index2], arr[index1]]
}
var b = list[y];
list[y] = list[x];
list[x] = b;