code: function deepClone(obj) {
    if (obj && typeof obj === 'object') {
      if (Array.isArray(obj)) {
        var newObj = [];
  
        for (var i = 0, j = obj.length; i < j; i++) {
          newObj[i] = deepClone(obj[i]);
        }
  
        return newObj;
      } else if (isPlainObj(obj)) {
        var _newObj = {};
  
        for (var _i in obj) {
          _newObj[_i] = deepClone(obj[_i]);
        }
  
        return _newObj;
      }
    }
  
    return obj;
  }
docs: quick clone deeply