/**
 * This exercise requires the user to concatenate strings using the OR operator (|).
 *
 * Task:
 * - Concatenate str1 and str2 using the OR operator and store the result in a variable named 'result'.
 * - Concatenate str2 and str3 using the OR operator and store the result in a variable named 'result2'.
 * - Finally, return the concatenation of the 'result' and 'result2' variables.
 *
 * Note:
 * - The OR operator returns the first operand if it is true, otherwise it returns the second operand.
 * - Example: 'a' | 'b' => 'a' (since 'a' is considered true)
 */
fun concatenateStrings(str1: String, str2: String, str3: String): String {

    val result = str1 + (str2.takeIf { it.isNotEmpty() } ?: str2)
    val result2 = str2 + (str3.takeIf { it.isNotEmpty() } ?: str3)
    return result + result2
}
/**
 * This exercise requires the user to concatenate strings using the OR operator (|).
 *
 * Task:
 * - Concatenate str1 and str2 using the OR operator and store the result in a variable named 'result'.
 * - Concatenate str2 and str3 using the OR operator and store the result in a variable named 'result2'.
 * - Finally, return the concatenation of the 'result' and 'result2' variables.
 *
 * Note:
 * - The OR operator returns the first operand if it is true, otherwise it returns the second operand.
 * - Example: 'a' | 'b' => 'a' (since 'a' is considered true)
 */
fun concatenateStrings(str1: String, str2: String, str3: String): String {
/**
 * This exercise requires the user to concatenate strings using the OR operator (|).
 *
 * Task:
 * - Concatenate str1 and str2 using the OR operator and store the result in a variable named 'result'.
 * - Concatenate str2 and str3 using the OR operator and store the result in a variable named 'result2'.
 * - Finally, return the concatenation of the 'result' and 'result2' variables.
 *
 * Note:
 * - The OR operator returns the first operand if it is true, otherwise it returns the second operand.
 * - Example: 'a' | 'b' => 'a' (since 'a' is considered true)
 */
fun concatenateStrings(str1: String, str2: String, str3: String): String {

    val result = str1 + (str2.takeIf { it.isNotEmpty() } ?: str2)
    val result2 = str2 + (str3.takeIf { it.isNotEmpty() } ?: str3)
    return result + result2
}