jQuery as function and Object, i.e. $() and $.()
<p>How can a global object be programmed to be treated as a function and a object? Just like jQuery does (if I am correct?)</p>

<p>For example:</p>

<pre><code> X.foo = '';
</code></pre>

<p>and</p>

<pre><code> X('bar');
</code></pre>
