title: Codewars 'odd or even?' on JavaScript
body: <p>Task:
  Given a list of numbers, determine whether the sum of its elements is odd or even.</p>
  <p>Give your answer as a string matching &quot;odd&quot; or &quot;even&quot;.</p>
  <p>If the input array is empty consider it as: [0] (array with a zero).
  My code:</p>
  <pre><code> function oddOrEven(array) {
    return array.reduce( function (sum, item) { return sum + item }) % 2 == 0 ? 'even': 'odd';
  } 
  </code></pre>
  <p>My problem:<br>
  Passed: 14 Failed: 1 Errors: 1 Exit Code: 1<br>
  TypeError: Reduce of empty array with no initial value<br>
  Why?</p>