move first item to last place array js splice code example
Example: how to move an element of an array in javascript
function moveElement(array,initialIndex,finalIndex) {
array.splice(finalIndex,0,array.splice(initialIndex,1)[0])
console.log(array);
return array;
}
// Coded By Bilal