SyntaxFix
Write A Post
Hire A Developer
Questions
If you're okay with a shallow copy, the underscore.js library has a clone method.
y = _.clone(x);
or you can extend it like
copiedObject = _.extend({},originalObject);