Sorting arrays.. :S

I have made me a manual sort function, because the normal sort function, and the sortOn function return resuolts like this

6,54,5,45,45,23,12,12

but nooo! mine does it too, any ideas?

function mSort() {
 for (var i = 0; i<nest.length; i++) {
  for (var j = 0; j<nest.length; j++) {
   if (nest*>nest[j]) {
    var temp = nest[j];
    nest[j] = nest*;
    nest* = temp;
    
   }
   trace(nest*)
  }
 }
 show = nest
}

help needed, must be easy, and im overlooking it