//翻转数组
var numbers = [4,7,9,3]; //生成一个新的数组,数组[3,9,7,4]
var newArray = [];
for(var i = numbers.length-1; i>=0;i--){
newArray[newArray.length] = numbers[i]
}
console.log(newArray);
标签:newArray,JS,length,numbers,数组,var,翻转
来源: https://blog.csdn.net/weixin_45599105/article/details/122448748