Generate max 'N' values from javascript array
<pre><code>var arr = new Array(2, 4, 9, 1, 5, 7, 10)
</code></pre>

<p>I want function that gets max value, than takes it out of an array and gets another max value.</p>
