Using the $.extend
is working, but it returns an Object and not a native Array, so the push()
won't work.
How can I extend an array, using the jQuery.extend
?
var x =[1,2];
var y = $.extend({},x);
y.push(3) // fail
edit: The array WILL contain objects, so - the
slice()
won't do the trick