标签:for function return deepcopy == obj func [] ret
function deepCopy(p,c){
c=c || {};
for(var i in p){
if(p.hasOwnProperty(p[i])){
if(typeof(p[i])===‘object‘){
c[i] = Array.isArray(p[i])?[]:{};
deepCopy(p[i],c[i])
}else{
c[i]=p[i]
}
}
}
return c;
}
标签:for function return deepcopy == obj func [] ret
原文地址:http://www.cnblogs.com/jessicaWy/p/7255914.html