title: jQuery style function defaults using objects
body: <p>I have a project that I am working on where I am not able to use jQuery. Since using jQuery, I have become very acustomed to the way that parameters can be set in a function.  It is very nice doing it the "jQuery" way, so that it does not matter the order, or even if you use all defaults like a normal function method would need.</p>
  
  <p>So, my question is how would I turn like this:</p>
  
  <pre><code>function myFunction(param1, param2, param3, param4, param5) {
  
  }
  </code></pre>
  
  <p>To a jQuery like method, without using jQuery:</p>
  
  <pre><code>function myFunction({
   param1: 'test',
   param2: 'test2'
  });
  </code></pre>
  
  <p>Any help on this would be great!</p>