transferArrayItem
Generic types: | T |
Moves an item from one array to another.
Presentation
function transferArrayItem (
currentArray: T[],
targetArray: T[],
currentIndex: number,
targetIndex: number,
): void;
Returns
void
Parameters
Name | Type | Description |
---|---|---|
currentArray | T[] | @param currentArray Array from which to transfer the item. |
targetArray | T[] | @param targetArray Array into which to put the item. |
currentIndex | number | @param currentIndex Index of the item in its current array. |
targetIndex | number | @param targetIndex Index at which to insert the item. |