I am attempting to clone an object in Javascript. I have made my own \'class\' that has prototype functions.
My Problem: When I clone an object, the
Instead of
var copy = {};
use
var copy = new obj.constructor;