move last element in array to first position array js code example
Example: move first element to last javascript
function shiftElementToLastPlace(array){
let arr = [...array]
arr.push(arr.shift())
return arr
}
function shiftElementToLastPlace(array){
let arr = [...array]
arr.push(arr.shift())
return arr
}