title: Node.js - create object of class name specified in variable
body: <p>I have a class hierarchy like: </p>
  
  <pre><code>               |-&gt; Square
  AbstractShape -+-&gt; Circle
                 |-&gt; Triangle
  </code></pre>
  
  <p>Now, I'd like to implement strategy pattern and create an object of class that's stored in string. In PHP I'd use:</p>
  
  <pre><code>$type = 'Square';
  $obj = new $type();
  </code></pre>
  
  <p>Is there an equivalent in Node.js?</p>