js 深度克隆函数
function re (obj){ let obj1; obj1=returnType(obj); if(typeof obj1 !== 'object'){ return obj1 } for(var i in obj){ if(typeof obj[i] !=='object'){ obj1[i]=obj[i]; }else{ obj1[i]=re(obj[i]) } } return obj1; } function returnType(obj){ if(typeof obj !=='object') { return obj }else if(obj instanceof Array) { return []; }else { return {} } }