/**
 * This function takes in two arrays and finds the common elements between them using a break statement.
 *
 * @param array1 The first array containing elements.
 * @param array2 The second array containing elements.
 * @return List of common elements between array1 and array2.
 */
fun findCommonElements(array1: List<Any>, array2: List<Any>): List<Any> {

    val commonElements = mutableListOf<Any>()

    for (element1 in array1) {
        for (element2 in array2) {
            if (element1 == element2) {
                commonElements.add(element1)
                break
            }
        }
    }

    return commonElements
}
/**
 * This function takes in two arrays and finds the common elements between them using a break statement.
 *
 * @param array1 The first array containing elements.
 * @param array2 The second array containing elements.
 * @return List of common elements between array1 and array2.
 */
fun findCommonElements(array1: List<Any>, array2: List<Any>): List<Any> {
/**
 * This function takes in two arrays and finds the common elements between them using a break statement.
 *
 * @param array1 The first array containing elements.
 * @param array2 The second array containing elements.
 * @return List of common elements between array1 and array2.
 */
fun findCommonElements(array1: List<Any>, array2: List<Any>): List<Any> {

    val commonElements = mutableListOf<Any>()

    for (element1 in array1) {
        for (element2 in array2) {
            if (element1 == element2) {
                commonElements.add(element1)
                break
            }
        }
    }

    return commonElements
}