title: Javascript prototype Class Literals best practice
body: <p>I am new to Javascript, so I wonder if the following code is a good practice.</p>
  
  <pre><code>CustomClass = function(var1, var2) {
      this.var1 = var1;
      this.var2 = var2;
  };
  CustomClass.prototype.aMethod = function() {
      console.log("my class method");
  };
  
  // Intend as main .js object, if that makes sense
  var m = {
      object1:CustomClass.prototype,
      object2:CustomClass.prototype,
  
      initObjects:function() {
          m.object1 = new CustomClass( value1, value2 );
          m.object1.aMethod();
          m.object2 = new CustomClass( value1, value2 );
          m.object2.aMethod();
      }
  };
  </code></pre>
  
  <p>Or should I create my custom class inside the "s" literal?</p>
  
  <p>Any help will be much appreciated</p>