Perluas JavaScript

function extend(object1, ...object2) {

  let mergedObject = Object.assign(object1, ...object2);
  console.log(mergedObject);

  return mergedObject;
}
Jittery Jaguar