title: static and non static data in same class (object) in javascript
body: <p>I understand that there are two ways of creating classes in JavaScript</p>
  
  <pre><code>var MyObj = function(val)
  {
    this.vari = val;
  }
  </code></pre>
  
  <p>Where val will be a non static member.</p>
  
  <p>Whereas,</p>
  
  <pre><code>var MyObj = new Object();
  MyObj.vari = "";
  </code></pre>
  
  <p>This is a single object so members of it here will act like static members. My question is that how do we have both static as well as non static content in same class?</p>