title: Recursive Factorial Function - Displaying method
body: <p>How would I display the method along with the answer? </p>
  
  <p>e.g. User input = 5,</p>
  
  <p>then the code output is "5 * 4 * 3 * 2 * 1 = 120" ?</p>
  
  <pre><code>function factorial(n)
  {
      var result = n;
      for (var i = 1; i &lt; n; i ++)
      {
          result = i * result;
      }
      alert("The answer is " + result);
  }
  </code></pre>
  
  <p>Any help is much appreciated</p>