How to define a new global object in javascript
<p>Hi
It is good practice to create one unique global object that wrap the functions and properties inside this object.I look up a lot of sample code and see code like this</p>

<pre><code>if(!myglobalObject) myglobalObject ={};
</code></pre>

<p>However , this code does not work ,I got an error saying 
<strong>ReferenceError: myglobalObject is not defined</strong>
Can anyone shed some light on why I got the error?</p>
