vararr=[3,56,45,4,6,64,24,65,76784,23,12,46,547,365,623,3210,1,21]
for(vari=0;i
for(varj=0;j<(arr.length-i-1);j++){
if(arr[j]>arr[j+1]){
vartemp=arr[j]
arr[j]=arr[j+1]
arr[j+1]=temp
}
console.log(arr)
}
}
vararr=[3,56,45,4,6,64,24,65,76784,23,12,46,547,365,623,3210,1,21]
for(vari=0;i
for(varj=0;j<(arr.length-i-1);j++){
if(arr[j]>arr[j+1]){
vartemp=arr[j]
arr[j]=arr[j+1]
arr[j+1]=temp
}
console.log(arr)
}
}