Strings In Depth5 / 17
Up next

Iterate characters

fun main() {
    val s = "abc"
    for (c in s) print("$c ")
    println()
    // map over the characters
    println(s.map { it.uppercaseChar() })
}
What you're solving

a String is a sequence of Char