Add This Functions in Your Script File
if( typeof Array.prototype.copy==='undefined' )
{
var a = [], i = this.length;
while( i-- ) {
a[i] = typeof this[i].copy!=='undefined' ? this[i].copy() : this[i];
}
return a;
};
if( typeof Array.prototype.remove==='undefined' ) {
Array.prototype.remove = function(obj) {
var a = [];
for (var i=0; i
{ if (this[i] != obj)
{ a.push(this[i]); }
} return a;}
}
How To Use
var ary=[1,2,3,4];
var copyary=ary.copy();
alert(copyary);
ary.remove(3);
alert(copyary); alert(ary);
if( typeof Array.prototype.copy==='undefined' )
{
var a = [], i = this.length;
while( i-- ) {
a[i] = typeof this[i].copy!=='undefined' ? this[i].copy() : this[i];
}
return a;
};
if( typeof Array.prototype.remove==='undefined' ) {
Array.prototype.remove = function(obj) {
var a = [];
for (var i=0; i
{ if (this[i] != obj)
{ a.push(this[i]); }
} return a;}
}
How To Use
var ary=[1,2,3,4];
var copyary=ary.copy();
alert(copyary);
ary.remove(3);
alert(copyary); alert(ary);