Moves an element from one position to another within an array.
The target array.
The index of the element to move.
The index where the element will be inserted.
The same target array.
const myarray = [0, 1, 2, 3, 4]PUtilsArray.moveItem(myarray, 1, 3)console.log(myarray) // 0, 2, 3, 1, 4 Copy
const myarray = [0, 1, 2, 3, 4]PUtilsArray.moveItem(myarray, 1, 3)console.log(myarray) // 0, 2, 3, 1, 4
Moves an element from one position to another within an array.