Different syntax for passing methods as arguments?
<p>I'm currently trying to teach myself more about javascript, and I find myself stumbling over the syntax for passing a method as an argument to another method call. Say you have two functions like these:</p>

<pre><code>    function FirstFunction()
    {
        DoesSomething();
    }


    function SecondFunction(func)
    {
        func();
    }
</code></pre>

<p>In actually passing the FirstFunction to the SecondFunction, I seem to see a wild variety of variations on doing so:</p>

<pre><code>    SecondFunction(FirstFunction);
</code></pre>

<p>or</p>

<pre><code>    SecondFunction("FirstFunction()");
</code></pre>

<p>or sometimes, if FirstFunction was defined as follows:</p>

<pre><code>    var thisisafunction = function FirstFunction()
    {
        DoesSomething();
    }

    SecondFunction(thisisafunction);
</code></pre>

<p>I'm guessing there's no "one right way" to do this, so when is it appropriate to use each way of passing a function? Is it better to use one way over another in a certain situation?</p>
