/**
 * This exercise requires the aerospace engineer to use a nested loop and a for loop with strings.
 *
 * The function takes in a string parameter and returns the intersection characters between the given string and
 * the letters 'aeiou'.
 *
 * Example:
 * If the input string is 'aerospace', the function should return 'ae'.
 *
 * Complete the code below to solve the exercise.
 */
fun intersectionStringLoop(aerospaceString: String): String {

    var intersection = ""

    for (char in aerospaceString) {  // Loop over each character in the input string
        for (vowel in "aeiou") {  // Loop over each vowel ('a', 'e', 'i', 'o', 'u')
            if (char == vowel) {  // Check if the character is equal to the vowel
                intersection += char  // Append the character to the intersection string
            }
        }
    }

    return intersection
}
/**
 * This exercise requires the aerospace engineer to use a nested loop and a for loop with strings.
 *
 * The function takes in a string parameter and returns the intersection characters between the given string and
 * the letters 'aeiou'.
 *
 * Example:
 * If the input string is 'aerospace', the function should return 'ae'.
 *
 * Complete the code below to solve the exercise.
 */
fun intersectionStringLoop(aerospaceString: String): String {
/**
 * This exercise requires the aerospace engineer to use a nested loop and a for loop with strings.
 *
 * The function takes in a string parameter and returns the intersection characters between the given string and
 * the letters 'aeiou'.
 *
 * Example:
 * If the input string is 'aerospace', the function should return 'ae'.
 *
 * Complete the code below to solve the exercise.
 */
fun intersectionStringLoop(aerospaceString: String): String {

    var intersection = ""

    for (char in aerospaceString) {  // Loop over each character in the input string
        for (vowel in "aeiou") {  // Loop over each vowel ('a', 'e', 'i', 'o', 'u')
            if (char == vowel) {  // Check if the character is equal to the vowel
                intersection += char  // Append the character to the intersection string
            }
        }
    }

    return intersection
}