first

Returns the first element.

fun <T> Array<out T>.first(): T(source)
fun main() {
    val words = arrayOf("apple", "banana", "cherry")
    val firstWord = words.first()
    println("The first word is: $firstWord")
}

Source