code: function (preserveExistingProperties) {
    var result = undefined;
    for (var i = 1; i < arguments.length; i++) {
      obj = arguments[i];
  
      // set initial result object to the first argument given
      if (!result) {
        result = obj;
        continue;
      }
  
      for (prop in obj) {
        if (Object.prototype.hasOwnProperty.call(obj, prop)) {
          // preserve preexisting child properties if specified
          if (preserveExistingProperties &&
              Object.prototype.hasOwnProperty.call(result, prop)) {
                continue;
              }
          result[prop] = obj[prop];
        }
      }
    }
  
    return result;
  }
docs: copy properties from right-most args to left-most