11.15笔记冒泡排序:var arr=[1231,414,235,436,457,457,658,56]var for(var i=1;i<arr.length;i++){ for(var n=0;n<arr.lenght-i;n++){ if(arr[n]>arr[n+1]){ var num=arr[n]; arr[n]=arr[n+1]; arr[n+1]=num } } } console.log(arr)