title: What kind of object am I creating here?
body: <p>I see many sites trying to prevent scope pollution by creating and populating a single object. For example:</p>
  
  <pre><code>var $ = {}
  $.something = function() {
     ...
  };
  </code></pre>
  
  <p>But I am wondering about the follow initialisation:</p>
  
  <pre><code>var $ = function() {
      // Something
  }
  $.something_two = function...
  </code></pre>
  
  <p>Is there any difference between the two and does the second code initialise a class instance upon each call?</p>