Returning Object Values in Javascript

Maybe I’m overthinking this. Will probably end up getting the answer if I just take a break from it for a second but I can’t get my head around it at the moment. Doing Javascript basics, and the problem question relates to amending objects in a function.

Will add the code below.
Sorry if I miss any details out – this is my first time seeking support on this community forum!

The question essentially presents you with object ‘Kitchen’ but with a few ‘issues’ that need sorting to make it read better. I’ve ‘passed’ 6 but failing the 7th requirement.

Requirements are:

  1. is a function – DONE
  2. should return a kitchen with the correct keys (hasFridge, favouriteAppliance, food, petName, totalShelves) – DONE
  3. should change each string to lower case in the object item – DONE
  4. should delete the hoover property, if present in the object – DONE
  5. should return the correct total number of shelves (5) – DONE
  6. should return the correct total number of shelves if only one shelf key is present

✕ AssertionError: expected 5 to equal 3

  1. should remove other shelf keys – DONE

The object:

let kitchen = {
  hasFridge: true, 
  favouriteAppliance: "KeTtlE",
  drinks: "lemoNAdE",
  food: "eGgS",
  shelvesInCupboards: 3,
  shelvesNotInCupboards: 2,
  petName: "RhuBarB",
  hoover: "DysOn" 
};

My code:

function sortTheKitchen(kitchen) {
    console.log(kitchen);
    delete kitchen.shelvesNotInCupboards
      const kitchenItems = {
        hasFridge: true,
        favouriteAppliance: 'kettle',
        food: 'eggs',
        petName: 'rhubarb',
        drinks: 'lemonade',
        shelvesInCupboards: 3
      };
      for (const key in kitchenItems) {
          for (const key1 in kitchen) {
            if (key === key1) {
              kitchen[key1] = kitchenItems[key]
            }
            if (key1 === 'hoover') {
              delete kitchen[key1]
            }
          }
      }
    delete kitchen.shelvesInCupboards
    kitchen.totalShelves = 5 
    return kitchen;
}