let arr = [2,3,8,9,1];

let newarr=[];


for(let i =0 ; i < arr.length; i++){


    newarr.push(arr[arr.length -i-1]);

    

}

console.log(newarr)