How to make variable $ works both as object $ and function $()? : <p>jQuery's variable <strong>$</strong> for example works both as object and function.</p>

<pre><code>// You can access object properties such as
$.fn;
// or
$.isReady;
// You can also call the function $ such as follows
$();
</code></pre>

<p><strong>How to make variable $ works both as object and function?</strong></p>

<pre><code>$ = function(){} // ???
$ = {}; // ???
</code></pre>
