code: function morph(object, newProperties) {
    for (let key in object) {
      delete object[key];
    }
  
    for (let key in newProperties) {
      object[key] = newProperties[key];
    }
  }
docs: replace object properties