title: Javascript assign function to existing variable
body: <p>Example code:</p>
  
  <pre><code>var someVar = {};
  someVar.text = "some text";
  
  var thisFunc = function(){
      this.subfunc = function(){
  
      }
  }
  </code></pre>
  
  <p>How can I assign <code>thisFunc</code> to <code>someVar</code>? If I do <code>someVar = new thisFunc()</code>, <code>someVar.text</code> will be gone.</p>
  
  <p>Thank you.</p>