title: Unable to access static variable in JavaScript object that subclasses another JavaScript object
body: <p>I have two JavaScript objects, one (Scope1.js) which "subclasses" another one (Scope2.js) by setting its prototype to the "base" object. Using alert, I can output the expected value for the static variable of the "base" object, but not for the "subclass" object. </p>
  
  <p>Expected Output</p>
  
  <pre><code>Scope1.staticVar1:scope1
  Scope2.staticVar2:scope2
  </code></pre>
  
  <p>Actual Output</p>
  
  <pre><code>Scope1.staticVar1:undefined
  Scope2.staticVar2:scope2
  </code></pre>
  
  <p>Can somebody please shed some light on what I'm doing wrong?</p>
  
  <p>Here's my code:</p>
  
  <p>Scope.html</p>
  
  <pre><code>&lt;html&gt;
      &lt;head&gt;                      
          &lt;script src="Scope1.js"&gt;&lt;/script&gt;
          &lt;script src="Scope2.js"&gt;&lt;/script&gt;
          &lt;script&gt;
              function Init() {
                  alert("Scope1.staticVar1:"+Scope1.staticVar1);
                  alert("Scope2.staticVar2:"+Scope2.staticVar2);
              }
          &lt;/script&gt;
      &lt;/head&gt;
      &lt;body onload="Init()"&gt;&lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Scope1.js</p>
  
  <pre><code>function Scope1() {
      Scope2.call(this);
  }
  Scope1.prototype = Object.create(Scope2.prototype);
  Scope1.staticVar1 = "scope1";
  </code></pre>
  
  <p>Scope2.js</p>
  
  <pre><code>function Scope2() {
  }
  Scope2.staticVar2 = "scope2";
  </code></pre>