title: javascript initialize object property
body: <p>This is going to be stupid, but... I for the life of me can't figure out how to initialize all the methods of an object.
  For instance</p>
  
  <pre><code>var obj = {
  prop1: function() { ... },
  prop2: function() { ... } //etc
  }
  </code></pre>
  
  <p>Can't figure out how to initialize them without calling
  obj.prop1() and obj.prop2(), which would be vary tedious if I have ya'know 10+ functions.
  I've also looked at something like, </p>
  
  <pre><code>var obj = new obj();
  
  function obj() {
      this.init=function() { ... };
      this.init();
  }
  </code></pre>
  
  <p>However, as far as I can tell, again, I'd have to initialize each one independently.</p>