Сортировка выбором

let numbers = [3, 5, 15, 6, 2, 1];
var n = 0;
for(var i = 0; i<numbers.length-1; i++) {
for(var j = i+1; j<numbers.length; j++){
if(numbers[i]>numbers[j]) {
n = numbers[i];
numbers[i] = numbers[j];
numbers[j] = n;
}
}
}

for(let j = 0; j < numbers.length; j++) {   
  for(let i = 0; i < numbers.length; i++) {
   
    if(numbers[j] < numbers[i]) {
      let swap = numbers[i];
      numbers[i] = numbers[j];
      numbers[j] = swap;
    };
     
  };  
};
numbers.sort((a, b) => a - b)