Javascript object in an other object
<p>I searching for an hour now (w/o any success), that how can I define an object in an other object (in javascript):</p>

<pre><code>function UserStat(arr) {
    var arrx = arr;
    this.day = function(dateofday) {
        //Some code going here which results will be stored variables like:
        this.a = someInnerFunction();
        this.b = someOtherFunction();
    }
}
</code></pre>

<p>I'd like to access these variable when I create an instance of the outer function, somehow like this if this is possible:</p>

<pre><code>var value = new UserStat(arr1).day('2012-10-20').a
</code></pre>

<p>Thank you in advance for any help!</p>
