/**
 * This function takes two lists of fashion elements as input and returns a list of common elements present in both lists.
 *
 * @param fashionList1 A list of fashion elements (e.g., clothes, accessories) for comparison.
 * @param fashionList2 Another list of fashion elements for comparison.
 * @return A list of fashion elements that are present in both fashionList1 and fashionList2.
 *
 * Example:
 * val fashionList1 = listOf("dress", "shirt", "jeans", "shoes", "belt")
 * val fashionList2 = listOf("shirt", "shoes", "bag", "scarf", "belt")
 *
 * findCommonElements(fashionList1, fashionList2)
 * Output: ['shirt', 'shoes', 'belt']
 */
fun findCommonElements(fashionList1: List<String>, fashionList2: List<String>): List<String> {

    val commonElements = mutableListOf<String>()

    // Loop through fashionList1
    for (item in fashionList1) {
        // Check if item is present in fashionList2
        if (item in fashionList2) {
            commonElements.add(item)
        }
    }

    return commonElements
}
/**
 * This function takes two lists of fashion elements as input and returns a list of common elements present in both lists.
 *
 * @param fashionList1 A list of fashion elements (e.g., clothes, accessories) for comparison.
 * @param fashionList2 Another list of fashion elements for comparison.
 * @return A list of fashion elements that are present in both fashionList1 and fashionList2.
 *
 * Example:
 * val fashionList1 = listOf("dress", "shirt", "jeans", "shoes", "belt")
 * val fashionList2 = listOf("shirt", "shoes", "bag", "scarf", "belt")
 *
 * findCommonElements(fashionList1, fashionList2)
 * Output: ['shirt', 'shoes', 'belt']
 */
fun findCommonElements(fashionList1: List<String>, fashionList2: List<String>): List<String> {
/**
 * This function takes two lists of fashion elements as input and returns a list of common elements present in both lists.
 *
 * @param fashionList1 A list of fashion elements (e.g., clothes, accessories) for comparison.
 * @param fashionList2 Another list of fashion elements for comparison.
 * @return A list of fashion elements that are present in both fashionList1 and fashionList2.
 *
 * Example:
 * val fashionList1 = listOf("dress", "shirt", "jeans", "shoes", "belt")
 * val fashionList2 = listOf("shirt", "shoes", "bag", "scarf", "belt")
 *
 * findCommonElements(fashionList1, fashionList2)
 * Output: ['shirt', 'shoes', 'belt']
 */
fun findCommonElements(fashionList1: List<String>, fashionList2: List<String>): List<String> {

    val commonElements = mutableListOf<String>()

    // Loop through fashionList1
    for (item in fashionList1) {
        // Check if item is present in fashionList2
        if (item in fashionList2) {
            commonElements.add(item)
        }
    }

    return commonElements
}