Assign value while assigning values
<p>Im starting to work more and more with Javascript and I occasinally run into the following problem.<br>
I want to assign values, based on <em>values I just entered</em>.</p>

<p><strong>Simple example:</strong></p>

<pre><code>var Example = {
    valueA : 100,
    valueB : 20,
    valueC : Example.valueA / Example.valueB
}
</code></pre>

<p>But this gives <code>Example is undefined</code> at the <code>valueC</code> line. I'm assuming that the <code>Example</code> object isn't ready to be used at this point, it first has to "finish being made".</p>

<p><strong>I could do:</strong></p>

<pre><code>var Example = {
    valueA : 100,
    valueB : 20,
    valueC : -1 // Gets value later
}
Example.valueC = Example.valueA / Example.valueB
</code></pre>

<p>In this example this would be perfectly accaptable, but I end up in situations where I would have a lot of these "<em>post init</em>" problems, or the assigned values are a bit more complecated (eg a formulae).</p>

<p><strong>Can something like "Simple Example" work?</strong> My Current solution feels like overkill, I need something more elegant which reads better when reading the code.</p>