数组对象的深拷贝
function copydeep(obj) {
var newobj = obj.constructor === Array ? [] : {};
if (typeof obj !== 'object') {
return;
}
for (var i in obj) {
newobj[i] = typeof obj[i] === 'object' ? copydeep(obj[i]) : obj[i];
}
return newobj
}