javascript assigning new object as object property
<p>I have an object that looks like this:</p>

<pre><code>var BigObject = {
    'CurrentInt': 0,
    'CurrentBool': false,
    'CurrentObject': {}
}
</code></pre>

<p>And then, I declare SomeObject like this:</p>

<pre><code>var SomeObject = {
      'SomeString': "",
      'SomeInt': 0
}
</code></pre>

<p>These two definitions are for the objects when they're in their initial state, sort of like a type definition I guess. Now I want to assign a <code>new</code> SomeObject to <code>BigObject['CurrentObject']</code>. I tried this:</p>

<pre><code>BigObject['CurrentObject'] = new SomeObject();
</code></pre>

<p>But it's not working. At the moment, I just do a straight assignment by reference <code>BigObject['CurrentObject'] = SomeObject;</code> and then when I need to reset the values of SomeObject, I just run a function that redeclares each property of SomeObject in its initial stage.</p>

<p>But how can I use the <code>new</code> keyword to create a reusable object type that's a property of BigObject.</p>

<p>Thanks.</p>
