function reverse(array) {
var newArray = [];
for (var i = array.length - 1; i >= 0; i--) {
newArray[newArray.length] = array[i];
}
return newArray;
}
// var arr = [5, 3, 2, 1];
// console.log(reverse(arr));
var arr = ['abc', 'xyz', '123'];
console.log(reverse(arr));