Reference to current object in constructor
<p>I'm trying to define a class that, in its constructor, instantiates other objects and passes them a reference to itself:</p>

<pre><code>var Child = function(m) {
  var mother = m;

  return {
    mother: mother
  }
}

var Mother = function() {
  var children = makeChildren();

  return {
    children: children
  }

  function makeChildren() {
    var children = [];
    for (var i = 0; i &lt; 10; i++) {
      var c = new Child(this);      // &lt;--- 'this' is an empty object here
      children.push(c)
    }
    return children;
  }
}
</code></pre>

<p>This doesn't work, and the Child instances end up with an empty object in their <code>mother</code> property. What is the proper way to do this?</p>
