Cloning a JavaScript object?
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/3474697/how-to-clone-js-object">How to clone js object?</a>  </p>
</blockquote>



<p>This is another way to create a javascript object (using object literal notation instead of function):</p>

<pre><code>user = {
  name: "Foo",
  email: "bar@baz.com"
}
</code></pre>

<p>Is there a way to clone this object or is it a singleton?</p>
