title: Dynamically creating a new javascript class from an existing object
body: <p>Say I have the following code:</p>
  
  <pre><code>var album = new MyObject('album');
  </code></pre>
  
  <p>Assume that when the object is constructed, a bunch of properties relative to only albums are loaded via AJAX. Would it be possible to create an <code>Album</code> class so that at a later point, I may just do this:</p>
  
  <pre><code>var anotherAlbum = new Album();
  </code></pre>
  
  <p>The <code>Album</code> constructor would automatically set the properties that are unique to album objects, based on what was loaded when creating <code>MyObject('album')</code></p>