How does JavaScript deal with function objects? See example
<p>I have a function like this</p>

<pre><code>function saveProfile(data, url, successFn) {

    $.ajax({

        dataType: 'json',
        data: data,
        url: url,
        type: 'post',
        success: function () {
            successFn();
        }
    });
}
</code></pre>

<p>is there any difference to passing the successFn directly like this...</p>

<pre><code>function saveProfile(data, url, successFn) {

    $.ajax({

        dataType: 'json',
        data: data,
        url: url,
        type: 'post',
        success: successFn
    });
}
</code></pre>
