/**
 * Chef wants to remove the ingredients that are listed in the removeList from the main ingredients list.
 * Implement a function that takes in two arrays: the main ingredients array and the removeList array.
 * The function should return a new list of ingredients after removing the items from the removeList.
 *
 * @param ingredients The main ingredients list.
 * @param removeList The list of ingredients to be removed.
 * @return The updated main ingredients list after removing the items from the removeList.
 *
 * Example:
 * removeIngredients(listOf("salt", "pepper", "garlic", "onion"), listOf("garlic", "salt"))
 * Output: ["pepper", "onion"]
 */
fun removeIngredients(ingredients: List<String>, removeList: List<String>): List<String> {

    val newIngredients = mutableListOf<String>()
    for (ingredient in ingredients) {
        if (ingredient !in removeList) {
            newIngredients.add(ingredient)
        }
    }
    return newIngredients
}
/**
 * Chef wants to remove the ingredients that are listed in the removeList from the main ingredients list.
 * Implement a function that takes in two arrays: the main ingredients array and the removeList array.
 * The function should return a new list of ingredients after removing the items from the removeList.
 *
 * @param ingredients The main ingredients list.
 * @param removeList The list of ingredients to be removed.
 * @return The updated main ingredients list after removing the items from the removeList.
 *
 * Example:
 * removeIngredients(listOf("salt", "pepper", "garlic", "onion"), listOf("garlic", "salt"))
 * Output: ["pepper", "onion"]
 */
fun removeIngredients(ingredients: List<String>, removeList: List<String>): List<String> {
/**
 * Chef wants to remove the ingredients that are listed in the removeList from the main ingredients list.
 * Implement a function that takes in two arrays: the main ingredients array and the removeList array.
 * The function should return a new list of ingredients after removing the items from the removeList.
 *
 * @param ingredients The main ingredients list.
 * @param removeList The list of ingredients to be removed.
 * @return The updated main ingredients list after removing the items from the removeList.
 *
 * Example:
 * removeIngredients(listOf("salt", "pepper", "garlic", "onion"), listOf("garlic", "salt"))
 * Output: ["pepper", "onion"]
 */
fun removeIngredients(ingredients: List<String>, removeList: List<String>): List<String> {

    val newIngredients = mutableListOf<String>()
    for (ingredient in ingredients) {
        if (ingredient !in removeList) {
            newIngredients.add(ingredient)
        }
    }
    return newIngredients
}