title: Javascript Reference Outer Object From Inner Object
body: <p>Okay, I see a few references given for Java, but not javascript ( which hopefully you know is completely different ). So here's the code specific :</p>
  
  <pre><code>function Sandbox() {
      var args = Array.prototype.slice.call(arguments)
          , callback = args.pop()
          , modules = (args[0] &amp;&amp; typeof args[0] === 'string' ? args : args[0])
          , i;
  
      if (!(this instanceof Sandbox)) {
          return new Sandbox(modules, callback);
      }
  
      if (!modules || modules[0] === '*') {
          modules = [];
          for (i in Sandbox.modules) {
              if (Sandbox.modules.hasOwnProperty(i)) {
                  modules.push(i);
              }
          }
      }
  
      for (i = 0; i &lt; modules.length; i++) {
          Sandbox.modules[modules[i]](this);
      }
  
      this.core = {
          'exp': {
              'classParser': function (name) {
                  return (new RegExp("(^| )" + name + "( |$)"));
              },
              'getParser': /^(#|\.)?([\w\-]+)$/
          },
          'typeOf': typeOf,
          'hasOwnProperty': function (obj, prop) {
              return obj.hasOwnProperty(prop);
          },
          'forEach': function (arr, fn, scope) {
              scope = scope || config.win;
              for (var i = 0, j = arr.length; i &lt; j; i++) {
                  fn.call(scope, arr[i], i, arr);
              }
          }
      };
  
      this.config = {
          'win' : win,
          'doc' : doc
      };
  
      callback(this);
  }
  </code></pre>
  
  <p>How do I access this.config.win from within this.core.forEach? Or is this not possible?</p>