John Resig Advanced Javascript Question
<p>Im in a little over my head, but I was wondering if anyone can help me with this one:</p>

<p><strong>taken from: <a href="http://ejohn.org/apps/learn/#43" rel="nofollow">http://ejohn.org/apps/learn/#43</a></strong></p>

<pre><code>function highest(){ 
  return arguments.slice(1).sort(function(a,b){ 
    return b - a; 
  }); 
} 
assert(highest(1, 1, 2, 3)[0] == 3, "Get the highest value."); 
assert(highest(3, 1, 2, 3, 4, 5)[1] == 4, "Verify the results.");
</code></pre>

<p><strong>I thought it should be:</strong></p>

<pre><code>Array.prototype.highest = function(){ 
  return arguments.slice(1).sort(function(a,b){ 
    return b - a; 
  }); 
} 
assert(highest(1, 1, 2, 3)[0] == 1, "Get the highest value."); 
assert(highest(3, 1, 2, 3, 4, 5)[1] == 1, "Verify the results.");
</code></pre>

<p>But this is giving me errors of undefined. </p>
