JavaScript Initialize Function
<p>I've recently been following some coding tutorials and I've gotten decent in my general JS knowledge (still have a ton to learn of course). On just about every tutorial I follow.. The code contains this or something like it.</p>

<pre><code>    initialize: function() {
    var self = this;
    this.store = new MemoryStore(function() {
        self.renderHomeView();
    });
</code></pre>

<p>Specifically </p>

<pre><code>    initialize: function() {
        // code in here
    }
</code></pre>

<p>I honestly just don't know what this is. Sure, I can finish following a tutorial just fine.. However, I want to understand what it is that I'm coding. Not just copy what someone else has written.</p>

<p>I've tried to use google to find out more about this, but I honestly don't have any clue what search terms to use.</p>

<p>Is this a way to declare a function?
As in:</p>

<pre><code>functionName: function(){
    // code here
}

// vs

function functionName(){
    // code here
}
</code></pre>

<p>What am I missing? Could someone send me a link to a resource for this?</p>

<pre><code>            Thanks, Jay
</code></pre>