function truncate(arr) {
let newArr=[];
arr.forEach(ele=>newArr.push(ele));
newArr.pop();
return newArr;
}
function truncate(arr) {
let newArr=[];
arr.forEach(ele=>newArr.push(ele));
newArr.pop();
return newArr;
}