function reverse(arr){ var newarr = []; for ( var i = arr.length - 1 ; i >= 0; i--){ newarr[newarr.length] = arr[i] ; } return newarr; } var arr1 = reverse([1,2,3,4,5,6]); console.log(arr1);