Javascript Code improvement - Integer factorial
<p>I am learning to code with Javascript and one exercise is about returning the factorial of a provided integer. For example: 5! = 1 * 2 * 3 * 4 * 5 = 120</p>

<p>I came up with a result and it was accepted. However, I am not so sure it would be the most efficient way of solving this. </p>

<p>Anyone would have any tips on how to improve this code?</p>

<pre><code>function factorialize(num) {
    var array = [];  
    for (i = 1; i &lt;= num; i++) {
        array.push(i);
    }
    var multi = 1;
    for (var i = 1; i &lt; array.length; i++) {
        multi *= array[i];
    }
    return multi;
} 
</code></pre>

<p>Many thanks!!</p>