title: Sorting a Javascript Array and get number difference
body: <p>I have 3 Javascript variables with different prices. I need to sort the prices in order of lowest to highest. The item with the lowest price will output "lowest", and the items with the higher price will only show the difference in price.</p>
  
  <p>For example:</p>
  
  <pre><code>var apple = 2.99;
  var watermelon = 12.99;
  var orange = 4.99;
  </code></pre>
  
  <p>This should then output:</p>
  
  <pre><code>Apple: Lowest, Orange: $2 more, Watermelon: $10 More
  </code></pre>
  
  <p>To accomplish this, I'm creating an array of three objects.</p>
  
  <pre><code>var item = new Array();
  item.push({apple:"2.99"});  
  item.push({watermelon:"12.99"});    
  item.push({orange:"4.99"});
  </code></pre>
  
  <p>Now I need to somehow sort through the array and get the difference in price. How would I accomplish this?</p>