/**
 * This exercise aims at looping through two lists and finding the common elements.
 *
 * @param list1 A list of elements
 * @param list2 Another list of elements
 * @return A list containing the common elements between list1 and list2
 */
fun findCommonElements(list1: List<Any>, list2: List<Any>): List<Any> {

    val commonElements = mutableListOf<Any>()

    // TODO: Write a nested loop to iterate through each element in list1 and list2
    for (item1 in list1) {
        for (item2 in list2) {
            // TODO: Check if the current elements in list1 and list2 are equal
            if (item1 == item2) {
                // TODO: Append common elements to the commonElements list
                commonElements.add(item1)
            }
        }
    }

    return commonElements
}
/**
 * This exercise aims at looping through two lists and finding the common elements.
 *
 * @param list1 A list of elements
 * @param list2 Another list of elements
 * @return A list containing the common elements between list1 and list2
 */
fun findCommonElements(list1: List<Any>, list2: List<Any>): List<Any> {
/**
 * This exercise aims at looping through two lists and finding the common elements.
 *
 * @param list1 A list of elements
 * @param list2 Another list of elements
 * @return A list containing the common elements between list1 and list2
 */
fun findCommonElements(list1: List<Any>, list2: List<Any>): List<Any> {

    val commonElements = mutableListOf<Any>()

    // TODO: Write a nested loop to iterate through each element in list1 and list2
    for (item1 in list1) {
        for (item2 in list2) {
            // TODO: Check if the current elements in list1 and list2 are equal
            if (item1 == item2) {
                // TODO: Append common elements to the commonElements list
                commonElements.add(item1)
            }
        }
    }

    return commonElements
}