let arr = [64,4,3412,235,36,34,62,35,3,12,1];
let t = 0;
for(let i =0;i<arr.length-1;i++){
for(let j =0;j<arr.length-1-i;j++){
if(arr[j]>arr[j+1]){
t = arr[j];
arr[j] = arr[j+1];
arr[j+1] = t;
}
}
}
console.log(arr);
let arr = [64,4,3412,235,36,34,62,35,3,12,1];
let t = 0;
for(let i =0;i<arr.length-1;i++){
for(let j =0;j<arr.length-1-i;j++){
if(arr[j]>arr[j+1]){
t = arr[j];
arr[j] = arr[j+1];
arr[j+1] = t;
}
}
}
console.log(arr);