function reverse(arr){
var newArr = []
for(var i = arr.length -1; i >= 0; i--){
// newArr剛開始為空,取到的是0索引,接收arr.length -1索引
newArr[newArr.length] = arr[i]
}
return newArr;
}
var na = reverse(['1','2','3','4','5','6']);
console.log(na);