reoderArray

reorderArray function takes an array and reorders its elements by moving an item from one index to another.

Example

Params
paramDescriptionTypeDefault
listThe array to be reordered. This can be an array of any type (T is a generic type).T[]-
startIndexThe index of the element in the array that you want to move.number-
endIndexThe target index where the element should be placed.number-
Return
returnDescriptionTypeDefault
resultA new array with the element reordered from startIndex to endIndex.T[]-