title: Undefined array parameter with Javascript
body: <p>I can't see why this function is returning undefined:</p>
  
  <pre><code>function sumArray(array) {
    array.reduce(function(result, item) {
      return result + item;
    })
  }
  
  array = [1,2,3]
  
  sumArray(array)
  </code></pre>
  
  <p>I've tried something similar and it works ok (below), so I'm not sure if it's specific to the parameter being an array?</p>
  
  <pre><code>function sayNumber(num) {
   return num + 1;
  } 
  
  num = 1
  
  sayNumber(num)
  </code></pre>