Automatically Generate max 'N' values from javascript array
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/1669190/javascript-min-max-array-values">JavaScript: min &amp; max Array values?</a><br>
  <a href="http://stackoverflow.com/questions/10617982/generate-max-n-values-from-javascript-array">Generate max &#39;N&#39; values from javascript array</a>  </p>
</blockquote>



<pre><code>var arr = new Array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
</code></pre>

<p>How to execute 5 max values from this array?
result must be like
<code>10, 9, 8, 7, 6</code></p>
