From: Klaus Hartl
is it possible to use $.extend to clone an object?
var template = { ... };
clone = $.extend({}, template);
To answer my question, yes it works :-)
Keep in mind that extend() does a shallow copy, not a deep copy.
var one = { a:1, b:{ c:2 } };
var two =
Michael Geary schrieb:
From: Klaus Hartl
is it possible to use $.extend to clone an object?
var template = { ... };
clone = $.extend({}, template);
To answer my question, yes it works :-)
Keep in mind that extend() does a shallow copy, not a deep copy.
var one = { a:1, b:{ c:2 }