title: jS OOP nested functions
body: <p>Ok this may be a noobolicious question as im new to OOP.</p>
  
  <p>Im attempting to build something of a JS Object Library and was wondering if I could do it using nested functions??</p>
  
  <pre><code>var object = new function() {
  
      this.action1 = function () {
          this.dostuff1 = function () {
               return "dostuff1";
          };
  
       this.dostuff2 = function () {
            return "dostuff2";
       };                   
  };
  </code></pre>
  
  <p>I am having trouble accessing the third level functions. Can I nest like this?</p>
  
  <pre><code>this.action2 = function () {
      return "action2";
  }; 
  
  alert(object.action1.dostuff2());
  </code></pre>