This function takes an argument to return the last elements of a list:
newList = numbers.takeLast(5)
println("Take last 5 elements")
println(newList)
The number.takeLast(5) function will return a list of the last five elements.
This function takes an argument to return the last elements of a list:
newList = numbers.takeLast(5)
println("Take last 5 elements")
println(newList)
The number.takeLast(5) function will return a list of the last five elements.
3.129.70.185