Variable number of object parameters to JavaScript function
<p>I want to pass in a variable number of javascript functions. </p>

<p>Doing it like this: </p>

<pre><code>function() {
    var args = Array.prototype.slice.call(arguments);  
    for(var i = 0; i &lt; args.length; i++){
        console.log(args[i]);
    }
}
</code></pre>

<p>But, I want to pass in a variable number of array or keyvalue items something like:</p>

<pre><code>dsmetrics.track({'object':'hi', 'type:1}, {'object':'hi', 'type:1}, {'object':'hi', 'type:1});
</code></pre>

<p>But that is the wrong syntax. Is there a correct syntax which can handle that?</p>
