Swaps the elements at the given indexes of an Array.
const array = [1, 2, 3];swap(1, 2)(array);console.log(array); // [1, 3, 2]
Generated using TypeDoc
Swaps the elements at the given indexes of an Array.
Mutation
Exmaple