title: javascript function output math calculation
body: <p>I am following a javascript video tutorial on pluralsight.com &amp; they have a javascript function but I don't understand how they got this result:</p>
  
  <pre><code>function factorial(n){
      if (n === 0 || n === 1){
      return 1;
      }
  return n * factorial(n-1);
  
  }
  console.log( factorial(5) ); // result is 120
  </code></pre>
  
  <p>Can anyone please explain me why this function is returning 120? I would expect it to return 5 * 4 = 20?
  <a href="http://jsfiddle.net/michelm/f8xaysqj/" rel="nofollow">>> JS Fiddle Link</a></p>