title: why do i need to add [exponent - 1] after 'stack'?
body: <p>I'm currently studying recursive functions in Javascript, and for the most part I understand what recursion is and how to use it, but I have one question: Why do I need "why do i need to add [exponent - 1] after 'stack'?" here is the code:</p>
  
  <pre><code>var stack = [];
  
  // Here is our recursive function
  function power(base, exponent) {
      // Base case 
      if ( exponent === 0 ) {
          return 1;
      }
      // Recursive case
      else {
          //Why do I need [exponent - 1]?
          **stack[exponent - 1] = base * power(base, exponent - 1)**;
          return stack[exponent - 1];
      }
  }
  </code></pre>