Working with string templates in a program

Report a typo

Consider a program written in Kotlin. The program contains a simple string template, where parts of the string are variables. During the program's run, it should output the character at a certain index of the string, the number of characters in the string, and the string in converted to uppercase. Your task is to fill the blanks in the code to ensure correct program operation.

Fill in the gaps with the relevant elements
fun main() {
    val name = "Jessica"
    val age = 25
    val message = "Her name is ${name} and she is ${age} years old."

    (message)
    println(message.get(3))   
    println(message.)
    println(message.())
}
lengthprintlntoUpperCase

Create a free account to access the full topic