Answers for "how to get first elements in an array in kotlin"

0

kotlin first element of array

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

println(intArray.first())

// Returns 10
Posted by: Guest on October-29-2020

Code answers related to "how to get first elements in an array in kotlin"

Browse Popular Code Answers by Language