var arr = [1, 2, 3, 4];
var arr1 = [];
for (let i = arr.length - 1; i >= 0; i--) {
arr1.push(arr[i]);
}
console.log(arr1);
function reverseArray (arr) {
var newArr = [];
var inArr = arr;
console.log(inArr);
for (i = 0; i < arr.length; i++) {
newArr[i] = inArr.pop(i);
}
return newArr;
}
reverseArray(["A", "B", "C", "D", "E", "F"]);
// OUTPUT: ["F", "D", "E"]