add to array kotlin
snippet in kotlin

kotlin add element to array

user5954

val list: MutableList<String> = ArrayList()
list.add(3, "Hello")
// Adds Hello as the third item in list

list.add("Goodbye")
// Adds Goodbye to the end of list

add to array kotlin

user3832

var listofVehicleNames = arrayListOf("list items here")