title: Recursion - Sum Nested Array
body: <p>I'm trying to sum a nested array <code>[1,2,[3,4],[],[5]]</code> without using loops but I don't see what's wrong with what I have so far.</p>
  <pre><code>function sumItems(array) {
    let sum = 0;
    array.forEach((item) =&gt; {
      if (Array.isArray(item)) {
        sumItems(item);
      } else {
        sum += item;
      }
    });
    return sum;
  }
  </code></pre>