/**
 * Given a list of pets, the function addNewPets should append the new pets to the existing list, keeping only the
 * cats and dogs. The function should use a continue statement to skip any pet that is not a cat or a dog.
 *
 * @param pets A list of existing pets
 * @param newPets A list of new pets to be added
 * @return The updated list of pets with only cats and dogs
 */
fun addNewPets(pets: MutableList<String>, newPets: List<String>): List<String> {

    for (newPet in newPets) {
        if (newPet !in listOf("cat", "dog")) {
            continue
        } else {
            pets.add(newPet)
        }
    }
    return pets
}
/**
 * Given a list of pets, the function addNewPets should append the new pets to the existing list, keeping only the
 * cats and dogs. The function should use a continue statement to skip any pet that is not a cat or a dog.
 *
 * @param pets A list of existing pets
 * @param newPets A list of new pets to be added
 * @return The updated list of pets with only cats and dogs
 */
fun addNewPets(pets: MutableList<String>, newPets: List<String>): List<String> {
/**
 * Given a list of pets, the function addNewPets should append the new pets to the existing list, keeping only the
 * cats and dogs. The function should use a continue statement to skip any pet that is not a cat or a dog.
 *
 * @param pets A list of existing pets
 * @param newPets A list of new pets to be added
 * @return The updated list of pets with only cats and dogs
 */
fun addNewPets(pets: MutableList<String>, newPets: List<String>): List<String> {

    for (newPet in newPets) {
        if (newPet !in listOf("cat", "dog")) {
            continue
        } else {
            pets.add(newPet)
        }
    }
    return pets
}