August 2018
Beginner
178 pages
4h 56m
English
This returns the sum of all numbers in the collection:
val numbers = listOf(1, 2, 3, 4, 5)val sum = numbers.sum()
Note that the min, max and sum functions can only be used on collections with number types.
Read now
Unlock full access