title: javascript reduce sum array with undefined values
body: <p>I have this simple array with numbers:</p>
  
  <pre><code>var arr = [100,200,undefined,450,300];
  </code></pre>
  
  <p>I would like to use <code>reduce</code> for quickly summing up the values in that array like so...</p>
  
  <pre><code>var total = arr.reduce( function( s, v ){ return s += v } );
  </code></pre>
  
  <p>In <code>return</code> I am getting <code>NaN</code>.</p>
  
  <p>Is there any way to make <code>reduce</code> to sum values in array with undefined values? like a flag or something... Thanks!</p>