Array constructor kotlin
// Step 1: Declare an array of integers with a size of 5
val intArray: IntArray = IntArray(5)
// Step 2: Initialize the array elements using the index
intArray[0] = 10
intArray[1] = 20
intArray[2] = 30
intArray[3] = 40
intArray[4] = 50
// Step 3: Print the array elements
println("Array elements:")
for (element in intArray) {
println(element)
}