get last element in array in kotlin code example Example: last element of an array kotlin myList.last()