moveItemInArray
Generic types: | T |
Moves an item one index in an array to another.
Presentation
function moveItemInArray (array: T[], fromIndex: number, toIndex: number): void;
Returns
void
Parameters
Name | Type | Description |
---|---|---|
array | T[] | @param array Array in which to move the item. |
fromIndex | number | @param fromIndex Starting index of the item. |
toIndex | number | @param toIndex Index to which the item should be moved. |