Javascript passing a function different sets of parameters
<p>So I have a function with quite a few parameters, for example</p>

<pre><code>function myFunction(height, width, name, surname, time){
...
}
</code></pre>

<p>The trouble is I want to use this function to send different sets of parameters.</p>

<p>So sometimes it would be...</p>

<pre><code>  function myFunction(height, width, depth, name, surname, time){
    ...
    }
</code></pre>

<p>The function is used for many tasks and I don't want a long list of parameters in the function coupled with lots of spaces in the values list when the function is called.</p>

<p>I need something more dynamic, ideally an associative array would be passed to the function and variables created from that.</p>
