copyArrayItem
Generic types: | T |
Copies an item from one array to another, leaving it in its original position in current array.
Presentation
function copyArrayItem (
currentArray: T[],
targetArray: T[],
currentIndex: number,
targetIndex: number,
): void;
Returns
void
Parameters
Name | Type | Description |
---|---|---|
currentArray | T[] | @param currentArray Array from which to copy the item. |
targetArray | T[] | @param targetArray Array into which is copy 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. |