1.0.0 • Published 5 years ago
@jswork/next-swap v1.0.0
next-swap
Array swap for next.
installation
npm install -S @jswork/next-swap
usage
import '@feizheng/next-swap';
const arr = [1, 2, 3, 4];
nx.swap(arr, 0, 3);
// [4, 2, 3, 1]
resources
- https://www.c-sharpcorner.com/blogs/swap-array-elements-in-javascript-using-array-prototype-and-other-methods
- https://dmitripavlutin.com/swap-variables-javascript/
license
Code released under the MIT license.
1.0.0
5 years ago