JVa冒泡排序
------------------------------冒泡排序---------------
let arry=[1,2,3,4,5,6];
let temo;//容器交换
//两层循环
for(let i=1;i<arry.length;i++){
for(let j=0;j<arry.length-i;j++){
if(arry[j]>arry[j+1]){
temp=arry[j];
arry[j]=arry[j+1];
arry[j+1]=temp;
}
}
}
console.log(arry);