浅拷贝:直接赋值
深拷贝:数组(nar=ar.slice(0)、nar=ar.concat()),对象(new Object())
var deepCopy = function(source) {
var result={};
for (var key in source) {
result[key] = typeof source[key]===’object’? deepCoyp(source[key]): source[key];
}
return result;
}