/**
 * This exercise involves nested for loops and concatenation.
 * Given two lists of strings, you need to concatenate each element of the first list
 * with each element of the second list and store the result in a new list.
 * For example, if the first list is ['apple', 'banana'] and the second list is ['red', 'yellow'],
 * the output list should be ['applered', 'appleyellow', 'bananared', 'bananayellow'].
 * Your task is to complete the code to solve this exercise.
 */
fun nestedLoopConcatenationExample(firstList: List<String>, secondList: List<String>): List<String> {

    // Initialize an empty list to store the concatenated strings
    val resultList = mutableListOf<String>()

    // Iterate over each element of the first list
    for (firstString in firstList) {
        // Iterate over each element of the second list
        for (secondString in secondList) {
            // Concatenate the first and second string
            val concatenatedString = firstString + secondString
            // Add the concatenated string to the result list
            resultList.add(concatenatedString)
        }
    }

    // Return the final result list
    return resultList
}
/**
 * This exercise involves nested for loops and concatenation.
 * Given two lists of strings, you need to concatenate each element of the first list
 * with each element of the second list and store the result in a new list.
 * For example, if the first list is ['apple', 'banana'] and the second list is ['red', 'yellow'],
 * the output list should be ['applered', 'appleyellow', 'bananared', 'bananayellow'].
 * Your task is to complete the code to solve this exercise.
 */
fun nestedLoopConcatenationExample(firstList: List<String>, secondList: List<String>): List<String> {
/**
 * This exercise involves nested for loops and concatenation.
 * Given two lists of strings, you need to concatenate each element of the first list
 * with each element of the second list and store the result in a new list.
 * For example, if the first list is ['apple', 'banana'] and the second list is ['red', 'yellow'],
 * the output list should be ['applered', 'appleyellow', 'bananared', 'bananayellow'].
 * Your task is to complete the code to solve this exercise.
 */
fun nestedLoopConcatenationExample(firstList: List<String>, secondList: List<String>): List<String> {

    // Initialize an empty list to store the concatenated strings
    val resultList = mutableListOf<String>()

    // Iterate over each element of the first list
    for (firstString in firstList) {
        // Iterate over each element of the second list
        for (secondString in secondList) {
            // Concatenate the first and second string
            val concatenatedString = firstString + secondString
            // Add the concatenated string to the result list
            resultList.add(concatenatedString)
        }
    }

    // Return the final result list
    return resultList
}