title: passing javascript method params as object literal
body: <p>I habitually pass parameters to functions as object literals, thus....</p>
  
  <p>calling:</p>
  
  <pre><code>render({
   param1: 99
   param2: {'a': 88, 'b': 77}
  });
  </code></pre>
  
  <p>method:</p>
  
  <pre><code>render: function (p) {
   alert( p.param1);
   var data = p.param2;
  
   etc
  }
  </code></pre>
  
  <p>I tend to pass parameters like this in all cases nowadays - even if the function / method only accepts 1 argument. The reason is that I find this method neat and also if I wish to add another parameter at a later date it is simple to add to to the object.</p>
  
  <p>I would like to know from some experienced javascript people if there is any reason why doing things in this way might be a bad idea - I do not work with other developers so am sometimes unsure if the way I do things is correct.</p>
  
  <p>Thanks!</p>