Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

moving a item fro index to another index, javascript

function arraymove(arr, fromIndex, toIndex) {
    var element = arr[fromIndex];
    arr.splice(fromIndex, 1);
    arr.splice(toIndex, 0, element);
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #moving #item #fro #index #javascript
ADD COMMENT
Topic
Name
6+7 =