JavaScript: How to build key-value pairs
<p>In jQuery you can pass key-value pairs like this</p>

<pre><code>$(this).colorbox({ width:100, height:500 });
</code></pre>

<p>I'm wondering if there is a way to build such key-value pair, eg. something like this</p>

<pre><code>var pairs = ???;

if(someCondition)
  pairs.Add('width', '100');
else
  pairs.Add('maxWidth', '200');

$(this).colorbox(pairs);
</code></pre>
