Check out example codes for "kotlin size of array". It will help you in understanding the concepts better.

Code Example 1

val a: Array<Double> = arrayOf(3.0, 4.5, 8.0, 19.0)

Code Example 2

arr = arrayOf(10, 20, 30, 40, 50)

// Use the size attribute
println(arr.size)

Learn ReactJs, React Native from akashmittal.com