标签:冒泡 i++ length div span pre 冒泡排序 var ++
var arr = [9,5,8,2,6,7,1,3]; for(var i = 0; i<arr.length; i++){ for(var j = i+1; j < arr.length; j++){ if(arr[i]>arr[j]){ var b = arr[i]; arr[i] = arr[j]; arr[j] = b; } } }
标签:冒泡 i++ length div span pre 冒泡排序 var ++
原文地址:https://www.cnblogs.com/hzx-5/p/11548856.html