/**
 * This exercise requires you to find the common elements between two lists.
 * You need to implement a function that takes in two lists as arguments and returns
 * a new list containing the elements that are present in both lists.
 *
 * @param list1 The first list.
 * @param list2 The second list.
 * @return A new list containing the common elements between the two input lists.
 */
fun findCommonElements(list1: List<String>, list2: List<String>): List<String> {

    val commonElements = mutableListOf<String>()
    for (element in list1) {
        if (element in list2) {
            commonElements.add(element)
        }
    }
    return commonElements
}
/**
 * This exercise requires you to find the common elements between two lists.
 * You need to implement a function that takes in two lists as arguments and returns
 * a new list containing the elements that are present in both lists.
 *
 * @param list1 The first list.
 * @param list2 The second list.
 * @return A new list containing the common elements between the two input lists.
 */
fun findCommonElements(list1: List<String>, list2: List<String>): List<String> {
/**
 * This exercise requires you to find the common elements between two lists.
 * You need to implement a function that takes in two lists as arguments and returns
 * a new list containing the elements that are present in both lists.
 *
 * @param list1 The first list.
 * @param list2 The second list.
 * @return A new list containing the common elements between the two input lists.
 */
fun findCommonElements(list1: List<String>, list2: List<String>): List<String> {

    val commonElements = mutableListOf<String>()
    for (element in list1) {
        if (element in list2) {
            commonElements.add(element)
        }
    }
    return commonElements
}