var arr = [1, 5, 8, 9, 6, 3]; var arr2 = []; while (arr.length) { var temp = arr.pop(); arr2.push(temp) } alert(arr2)
数组的翻转(非reverse)
原文:http://www.cnblogs.com/samsara-yx/p/7911807.html