get first 3 elements of array kotlin code example
Example: kotlin first element of array
// Use the first() function
var intArray = arrayOf(10, 20, 30, 40, 50)
println(intArray.first())
// Returns 10
// Use the first() function
var intArray = arrayOf(10, 20, 30, 40, 50)
println(intArray.first())
// Returns 10