title: Non-static private variables in javascript
body: <p>I'm setting up my javascript objects like the following</p>
  
  <pre><code>Object1 = function() {
    var privateMember = "private value"
  
    return {
      publicMember: "public value"
      setPrivateMember: function(value) {
         privateMember = value;
      }
    }
  }();
  </code></pre>
  
  <p>Now if I use prototypal inheritance to create new objects </p>
  
  <pre><code>Object2.prototype = Object1
  </code></pre>
  
  <p>And then set the private member</p>
  
  <pre><code>Object2.setPrivateMember("new value");
  </code></pre>
  
  <p>Then the value of private member in Object 1 changes too, so it behaves more like a static variable. Is there a way I can get private variables to not be static?</p>
  
  <p>PS - I'm a self-taught programmer so my use of terminology might be a bit sketchy. Let me know if it needs clarifying</p>