code: function sort(array, compareFn){
              compareFn = compareFn || function(item1, item2){ return item1.localeCompare(item2);};
              for(var i= 0,len = array.length; i<len; i++){
                  for(var j = i,length = array.length; j<length; j++){
                      if(compareFn(array[i], array[j]) > 0){
                          var t = array[i];
                          array[i] = array[j];
                          array[j] = t;
                      }
                  }
              }
              return array;
          }
docs: 冒泡排序