Look at this code:
fun main() {
val input = "1 2 3 4 5 6 7 8 9 10"
demoList(input)
}
fun demoList(input: String) {
val inputList = input.split(" ")
println(inputList[-1])
}When you compile this code, it throws an exception. Which function throws the exception?