/**
 * This function takes two lists of strings and returns a new list containing the concatenation of their elements.
 *
 * @param firstList A list of strings.
 * @param secondList Another list of strings.
 * @return A new list with the concatenation of the elements from both input lists.
 */
fun concatenateElements(firstList: List<String>, secondList: List<String>): List<String> {

    // Initialize an empty list
    val result = mutableListOf<String>()

    // Concatenate elements from the first list
    for (element in firstList) {
        result += element  // Use the addition assignment operator to add the element to the result list
    }

    // Concatenate elements from the second list
    for (element in secondList) {
        result += element  // Use the addition assignment operator to add the element to the result list
    }

    return result
}

// test the function
/**
 * This function takes two lists of strings and returns a new list containing the concatenation of their elements.
 *
 * @param firstList A list of strings.
 * @param secondList Another list of strings.
 * @return A new list with the concatenation of the elements from both input lists.
 */
fun concatenateElements(firstList: List<String>, secondList: List<String>): List<String> {
/**
 * This function takes two lists of strings and returns a new list containing the concatenation of their elements.
 *
 * @param firstList A list of strings.
 * @param secondList Another list of strings.
 * @return A new list with the concatenation of the elements from both input lists.
 */
fun concatenateElements(firstList: List<String>, secondList: List<String>): List<String> {

    // Initialize an empty list
    val result = mutableListOf<String>()

    // Concatenate elements from the first list
    for (element in firstList) {
        result += element  // Use the addition assignment operator to add the element to the result list
    }

    // Concatenate elements from the second list
    for (element in secondList) {
        result += element  // Use the addition assignment operator to add the element to the result list
    }

    return result
}

// test the function