takeLast

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. 

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.129.70.185