title: passing parameter to closure function in javascript
body: <pre><code>MyLibrary.MyModule =
          (
              function initialise() {
                  this.id = id;
                  this.c = document.getElementById(id);
                  this.ctx = this.c.getContext('2d');
  
                  this.properties = {
                      setup: {
                          backgroundColour: options.setup.backgroundColour || 'black'
                      },
  
                      scale: {
                          show: options.scale.show || true,
                          colour: options.scale.color || 'white'
                      },
                  }
                  console.log(properties.setup.baseFontSize);
              }
          )(id, options);
  </code></pre>
  
  <p>I'm calling this code using </p>
  
  <pre><code>new MyLibrary.MyModule('c',options);
  </code></pre>
  
  <p>but the 'id' and options seems to be not defined.<br>
  can someone help?</p>