Copying an Object in Javascript
<p>I'd like a simple, straight-forward answer to this question. What better place on the web than to archive it here?</p>

<p>I have an object x. I'd like to copy it as object y, such that changes to y do not modify x.</p>

<p>What's the most elegant way of doing this in javascript?</p>

<p>Edit: I realize that copying objects derived from built in javascript objects will result in extra, unwanted properties. This isn't a problem, since I'm copying one of my own, literal-constructed objects.</p>
