title: Javascript Constructor to Initialize Private Variables
body: <p>Ok, so I'm using the following skeleton code to create a Javascript Library</p>
  
  <pre><code>var Device = (function(window, document, $) {
      function func_1(){
           return 1;
      }
  
      function func_2(){
          return 2;
      }
  
      var internalDevice = {
          func_1: func_1,
          func_2: func_2
      };
      return internalDevice; // expose functionality to the rest of the code
  })(window, document, jQuery);
  </code></pre>
  
  <p>Essentially, I would call my functions like so: <code>Device.func_1();</code>.</p>
  
  <p>I'm looking to add a constructor that will initialize some private variables from the get-go i.e. as soon as the object is created, and without having to make any extra function call(s). </p>
  
  <p>How do I do this?!</p>
  
  <p>Thanks.</p>