title: Unidentified sorting algorithm
body: <p>Does anyone recognize this sorting algorithm? I have provided the code for it in javascript and you can see it working on this link <a href="http://jsfiddle.net/EBC6T/6/" rel="nofollow">http://jsfiddle.net/EBC6T/6/</a> </p>
  
  <pre><code>var unsortedArr=[4,3,2,1];
  
  var swap=function(arr,i,j){
     var temp=arr[i];
     arr[i]=arr[j];
     arr[j]=temp;
  };
  
  var theUnknownSort=function(arr){
  for(var i=0; i&lt;arr.length; i++){
      for(var j=i+1; j&lt;arr.length;j++){
          if(arr[i]&gt;arr[j]){
          swap(arr,i,j);
          document.getElementById('test').innerHTML += "&lt;li&gt;"+arr+"&lt;/li&gt;";
          }
      }
   }
  
  };
  
  theUnknownSort(unsortedArr);
  </code></pre>
  
  <p>Sequence of sort:</p>
  
  <pre><code>3,4,2,1
  2,4,3,1
  1,4,3,2
  1,3,4,2
  1,2,4,3
  1,2,3,4
  </code></pre>