title: Create multiple objects of module pattern
body: <p>Please look at the sample code below:</p>
  
  <pre><code>var sample = (function () {
    var a, b;
    var sample = function (x, y) {
      a = x;
      b = y;
    };
    return {
      add: function () {
        return a + b;
      }
    }
  })();
  </code></pre>
  
  <p>Is there anything wrong with this?</p>
  
  <p>How can I create multiple objects of the sample object?</p>
  
  <p>How should I write constructors?</p>
  
  <p>I tried creating object by:</p>
  
  <pre><code>var s = new sample(1, 2);
  </code></pre>
  
  <p>But, it throws an error!</p>