title: How to isolate my javascript code to prevent collisions?
body: <p>I have been writing a lot of javascript functions and event listeners and I want to move them into their own namespaced, isolated place that doesn't conflict when I concatenate and minify it with my other javascript files.</p>
  
  <p>I am still new to javascript, so there may be simple solution to this answer. I started by creating a javascript object:</p>
  
  <pre><code>var MySpecialStuff = {
      init: function(){
          //do everything here
      }
  };
  </code></pre>
  
  <p>Then in my html, on the page I want to use it on I can initialize this code:</p>
  
  <pre><code>&lt;script&gt;
      MySpecialStuff.init();
  &lt;/script&gt;
  </code></pre>
  
  <p>But then the <code>init</code> method started growing and I need to start breaking that code into smaller chunks, but I am stuck on the syntax and how to set private methods/variables and call them from within the <code>init</code> method and other private methods. How can I do this?</p>
  
  <p>Am I headed in the right direction? What other ways can I / should I go about doing this sort of thing?</p>