title: array.reduce implementation through recursion
body: <p>i am trying to implement Array.reduce() method through recursion, it works for me</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var index = 0;
  function reduce(arr, fn, initial) {
      if (index &gt;= arr.length) {
          return initial;
      }
      if (!initial) {
          initial = arr[index];
          index++;
      }
      initial = fn(initial, arr[index], index, arr);
      index++;
      return reduce(arr, fn, initial);
  }</code></pre>
  </div>
  </div>
  </p>
  
  <p>but verifier doesn't accept my answer. What i did wrong?</p>