Passing a function into another function
<p>I have a function that is similar to this:</p>

<pre><code>function foo(array1, fun) {
    var n;
    n = a.length;
    var i;
    for (i=0; i&lt;=n; i++) {
        fun(a[i]);
    }
}
</code></pre>

<p>Now I want to create a function called <code>mult(x)</code> that I will pass into <code>foo</code> when I call it. My question is what do I put in the parameters of my <code>mult</code> function when I want to call:</p>

<pre><code>foo(some_array, mult(x));
</code></pre>

<p>Thanks for the help!</p>
