title: Why does reduceRight return NaN in Javascript?
body: <p>I'm using Firefox 3.5.7 and within Firebug I'm trying to test the array.reduceRight function, it works for <strong>simple arrays</strong> but when I try something like that I get a <strong>NaN</strong>. Why?</p>
  
  <pre><code>&gt;&gt;&gt; var details = [{score : 1}, {score: 2}, {score: 3}];
  &gt;&gt;&gt; details
  [Object score=1, Object score=2, Object score=3]
  &gt;&gt;&gt; details.reduceRight(function(x, y) {return x.score + y.score;}, 0)
  NaN
  </code></pre>
  
  <p>I also tried map and at least I can see the .score component of each element:</p>
  
  <pre><code>&gt;&gt;&gt; details.map(function(x) {console.log (x.score);})
  1
  2
  3
  [undefined, undefined, undefined]
  </code></pre>
  
  <p>I read the documentation at <a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/reduceRight" rel="nofollow noreferrer">https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/reduceRight</a> but apparently I can't get it work to sum up all the <strong>score</strong> values in my <strong>details</strong> array. Why?</p>