JavaScript-反转数组
// 反转数组 var arr = [2, 0, 6, 1, 77, 0, 52, 0, 25, 7]; var newArry = []; for (var i = arr.length - 1; i >= 0; i--) { newArry[newArry.length] = arr[i]; } console.log(newArry);