title: How to access static member on instance?
body: <p>Here is code, I've been struggling for hours with that, idea is to keep track of how many instances is created, but also make possible to call static method and change/update static member. There is similar question, but I can't implement any solution to my problem.</p>
  
  <pre><code>  // object constructor
  function Foo() {
      this.publicProperty = "This is public property";
  }
  // static property
  Foo.staticProperty = "This is static property";
  
  // static method
  Foo.returnFooStaticProperty = function() {
      return Foo.staticProperty;
  };
  
  
  console.log("Static member on class: " + Foo.staticProperty); // This is static property
  
  
  console.log("Result of static method: " + Foo.returnFooStaticProperty()); //This is static property
  
  var myFoo = new Foo();
  console.log("myFoo static property is: " + myFoo.staticProperty); // undefined
  </code></pre>
  
  <p>For sake of simplicity I have changed constructor and member names here. I think it is obvious what happening. I want both of constructor object and instance share same static property.</p>
  
  <p>I can access static member on constructor object, but on instance I got undefined.</p>