kotlin first element of array
snippet in kotlin

kotlin first element of array

user1424

// Use the first() function
var intArray = arrayOf(10, 20, 30, 40, 50)

println(intArray.first())

// Returns 10