Getting an element

Report a typo
Given the following code:

val arr = intArrayOf(1, 2, 3, 4, 5, 6, 7, 8, 9)
val n = 6
val elem = arr[arr[n]]

Enter the value of elem.
Enter a number
___

Create a free account to access the full topic