set

Common
JVM
JS
Native
1.0
operator fun set(index: Int, value: T)
(Common source) (Native source)
For Common, JVM, JS

Sets the array element at the specified index to the specified value. This method can be called using the index operator.

arr[index] = value

If the index is out of bounds of this array, throws an IndexOutOfBoundsException except in Kotlin/JS where the behavior is unspecified.

For Native

Sets the array element at the specified index to the specified value. This method can be called using the index operator.

arr[index] = value

If the index is out of bounds of this array, throws an IndexOutOfBoundsException.