title: Am I wrong to feel this recursive function feels like a 'for loop?'
body: <p>Can someone explain how this recursive function produces 5 * 4 * 3 * 2 * 1 to get 120?</p>
  
  <pre><code>var factorial = function(n){
     if (n === 0)
         return 1;
     else
         return n * factorial(n - 1); 
  };
  
  factorial(5); // spits out 120
  </code></pre>
  
  <p>If we use 5 like like in the example, once we got to the else statement wouldn't</p>
  
  <pre><code>return n * factorial(n - 1);
  </code></pre>
  
  <p>translate to 'return 5 multiplied by the factorial function(5-1); 5 times...</p>