code: function deepCopy(obj) {
    var result = {};
    var type = toString.call(obj);
  
    if (!obj || (type === "[object RegExp]") || typeof obj !== "object")
      return obj;
  
    if (type === "[object Array]")
      return slice.call(obj);
  
    for (var k in obj) {
      result[k] = deepCopy(obj[k])
    }
  
    return result;
  }
docs: 深度拷贝